 Agriculture and herding remained the foundation of the town's economy until the advent of lead mining in the late 18th century.The town went through an economic boom in 1835 with the introduction of the table grape and the development of irrigation projects that increased the amount of arable land.At the turn of the 20th century the population had grown to about 3000, around twice the present number.