. In the first decade of the
Umayyad conquest of Hispania, Berber troops set up garrisons on the northernmost hilly regions and towns.
Uthman ibn Naissa settled down in
Cerdanya, killed the bishop of Urgell, and rebelled against central Cordovan rule in 730. The Berber lord was killed in 731, and the region was subdued by
Abd al-Rahman al-Ghafiqi. During the
episcopacy of the Bishop
Felix (781–799), who was accused of
adoptionism by the
Carolingian theologians and for this motive deposed and confined to
Lyon, the city of Urgell and its church were completely destroyed by the Arabs around 793. With the founding of the
Marca Hispanica, the diocese, like the others recently restored, became part of the
ecclesiastical province of Narbonne until the re-creation of the
metropolitan see of Tarragona in 1091. The
Frankish kings intervened effectively in the country's reconstruction, promoting the
Reconquest and laying the foundations of its government. The territory now being mainly free from the
Moors' power, and with the help of the first
Catalan Counts, they promoted the construction of a new cathedral, completed in the second part of the 9th century, to which were assigned 289 towns or villages — all in the northwestern area of the
Pyrenees. At the same time, the Urgell church, ruled for more than two centuries (914–1122) by members of the Counts' families, fully entered the ring of the feudal system, allowing it to shape for itself an extensive seigniorial patrimony: including, among other cities and territories, the city of Urgell; the valleys of
Andorra, the
Vall de la Llosa, the
Vall d'Arques, and the
Ribera Salada; the villages of
Sanaüja,
Guissona, and, from 1257 onwards,
Tremp. This, however, forced it into a certain dependence on the superior power of the counts. Also, the
Gregorian Reform, introduced to the County of Urgell during the last years of the 11th century and preceded by the change of the
Visigothic rite for the
Roman rite, reduced those interventions of the
laymen in ecclesiastical affairs and achieved the complete freedom of the Church in the spiritual and temporal domains. Moreover, the maintenance of those possessions were the source of constant tension and fighting throughout the Middle Ages with the viscounts of
Castellbó and his heirs, the counts of
Foix. ==List of bishops of Urgell==