The conquest of the Muslim city by the count of Urgell in 1105 led to a steep decline of the urban centre and to the emigration of many of the people who had lived there under the aegis of Al-Andalus. The city’s economic life would not really recover until the beginning of the 14th century, when the Counts of Barcelona became the new rulers of the county of Urgell; a turning point which gave rise to great surge in the city’s development. A series of public works were undertaken then, which built the church of Santa Maria, the bridge and the city gate of Sant Miquel, and the monastery of Sant Domènec, among others, which greatly improved the look of the city and gave it some of the visual character it has today.
A second event had dramatic consequences for the shape and feel of the city, when Alfons IV, nicknamed the Benign, King of Aragon and Count of Barcelona, issued an edict ordering the Jews to live together in a community outside the walled city. This gave rise to the creation of the separate Jewish quarter, which was built in an area south of the Mercadal, the central market, which would eventually be encompassed by the new city walls. With the conquest of Balaguer by Ferdinand of Antequera, King of Spain, and the disappearance of the lineage of the counts of Urgell, the city became part of the Crown of Aragon and its transition to modern times began.