During the Catalan Revolt the castle was destroyed and the sixteenth-century shrine which depended on the Junqueras convent, Barcelona, was sacked and in 1665 the location was listed as deserted. The Spanish War of Succession in 1707 caused a second disaster and a second depopulation. The city council of Lleida, which emerged from the Nueva Planta decrees in 1719, appointed a mayor from within the criminal jurisdiction of the location and municipal area of Alcoletge, and this served as the origin of the independent municipality.