The first reliable data on the history of Villalba del Alcor date back to the Late Bronze Age, some four millennia ago. Remains of nearby mining operations remain evident; these were scattered along the Corumbel River. From the Roman period, we find several important remains in this municipality, such as coins, vases, and so on. The most notable of these is found on the "Las Estaquillas" estate, two kilometers from the town center. It is a portrait of Agrippina, wife of the Emperor Claudius. Her hairstyle, characteristic of the Agrippinas (the use of small curls and the arrangement of her hair in side bands covering the ears), shed light on her identification. These remains suggest that, in the vicinity of the town center, and in the direction of Corumbel, there were several villas belonging to prominent families, who would have made a living from the mines and farming. Another finding that supports the hypothesis of Roman settlement in the region is the existence of a tombstone dedicated to Iuno Regina in 134 BC. It was found at the base of the bell tower of the Church of San Bartolomé, although it owes its origin to the town of Ostur, near Manzanilla. No other significant events are found from this period; the Dehesa de Purchena was continuously settled. Its name, of Roman origin, comes from Porcius plus the suffix -ana (indicative of ownership), which would mean Villa Porciana. This region was also inhabited by Muslims who established scattered farmsteads along the Giraldo stream.
After these basic notions about its surroundings, we will focus on the evolution of the population center and the reasons that made Villalba a prominent town in the County of Huelva.
The birth of Villalba del Alcor is due to its appeal as a border area for Christians and Muslims. Villalba's high strategic value led to the construction of a fortress, which also served as a mosque in its time, as was the case with La Rábida. It belonged to Niebla until 1253, when it was reconquered by Alfonso X the Wise. Later, in 1331, Villalba passed into the hands of the daughter of the Chief Constable of Niebla, Leonor Núñez. Around 1350, the town was purchased by Alvar Pérez de Guzmán, thus establishing this lineage, which would extend practically until the 15th century.
The Pérez de Guzmán and Zúñiga lines were united in 1395 through marriage. It was then that Villalba passed into the hands of the Zúñiga family until the dissolution of the lordships in 1812.
Villalba del Alcor, from the Late Middle Ages, became established. The place names "Villalba" and "Alcor" come from different origins: the former is of Christian origin, and the latter means "hill" and is of Muslim origin.
On the social level, the rich and varied heritage reflects the economic strength of its inhabitants. In the 16th century, the town center and its population grew. Two Carmelite congregations were founded: the monastery of friars of Santa María de la Antigua in 1588, and the convent of shod nuns of San Juan Bautista in 1619.
In 1642, it had 1,750 inhabitants; in the second half of the century, the country's demographic and economic crisis worsened. In the 18th century, Villalba experienced few demographic changes. To further expand on the data on these dates, we can refer to the Cadastre of the Marquis of Ensenada, which describes this situation in detail. Population growth and dependence on agriculture led, throughout the 19th century, to a widespread movement to clear new lands, nearly wiping out the vacant and municipal lands, and changing the forest landscape. Vineyards, the County's star crop, developed on these lands, along with a significant wine industry that eventually included numerous wineries and at least three brandy stills.