Sanauja (cat. Sanaüja) was conquered by the Muslims on behalf of the Earl of Urgell in 951. In 1001, the castle was mentioned in the bill of Pope Sylvestre II (cat. Silvestre II) about the transfer of the fortress (“castrum quoque Sanaugia cum finibus suis” – “Sanaugia castle with its lands”) to Bishop Urgell. The possession of the castle by the Urgell Diocese is confirmed by Pope Benedict VIII (cat. Benet VIII) in 1012 in another document that ratifies the limits of the authority of the bishop. During the 11th century, the territory was reorganized and the Sanauja castle acquired an important strategic place in the defensive line passing along the Llobregos valley, built by Count Ermengol II of Urgell in 1035.
At the end of the 11th century, Bishop of Urgell, Gillem (cat. Bisbe d’Urgell, Guillem), gave “ipsum kastrum de Sanauga” with all the surrounding lands to his vassal, Viscount Ramon Folk de Cardona, who, in turn, conceded the castle to Eriman (cat. Eriman), who, like the subsequent castellans and vassals, remained loyal to the bishop. In 1072, the Bourgeois of Urgell, Guillem de Cerdanya (cat. Guillem de Cerdanya), transferred a patrimony to the Church of Tulsa alongside other possessions that belonged to him in Sanauja. In 1099, the castle was once again mentioned in the history: Pope Urban II (cat. Urbà II) confirmed the affiliation of the castle with the Urgell Diocese, ruled by Bishop Ot (cat. Ot). In 1105, a couple of agreements on the distribution of powers were signed by Señor Sanauja Pere Ramon (cat. Pere Ramon de Sanaüja) and his vassal Pere Pons (cat. Pere Ponç) and Bishop of Urgell Ot with Pere Ramon Sanauja.
The lineage of Sanauja seniors, which appeared at the beginning of the XII century, began to grow increasingly more important in the middle of the XII century and in the XIII. The family took possession of the Lor castle. Rodolphe de Sanauja (cat. Rodolf de Sanaüja) became the head of the Templar Knights Order (cat. Cerveta) (1147) and participated in the siege of Lleida in 1149. Arnau de Sanauja (cat. Arnau de Sanaüja) and Pere Ramon de Sanauja (cat. Pere Ramon de Sanaüja) received property in Lleida and took an active part in settling lands in the southern part of the Segrià comarca (cat. Segrià). Others from this clan became canons of St. Mary’s Chapter in Solsona (cat. Santa Maria de Solsona).
In 1163, there is a change in the ownership of the various castles, including Sanauja, because Count Ermengol VII of Urgell (for himself and for his descendants) was obliged to be only their guardian. In 1174, there is a document of reclamations among the Bishop Arnau de Preixens and Pere de Sanauja for the redistribution of the castle’s earnings. Litigation did not stop until 1195. In 1197, an agreement was signed between the Countess of Urgell, Elvira (cat. Comtessa d’Urgell Elvira) and Pere de Sanauja, concerning the ownership of the castle.
According to the tax lists of 1381, there were 104 fireplaces in the town of Sanauja. Sarauja always belonged to the bishops of Urgell, who in the 16th and 17th centuries rebuilt the castle so that they could live in it, but in reality, they used it very rarely. The Urgell Diocese lost its rights to the castle as a result of the 1836 de-amortization.
The most significant element of the castle are the remains of an early medieval building; the ruins are located on the very top of the hill to which the town clung. It was a military fortress, to which later extensions were gradually added (with the goal of turning it into a fortified palace or episcopal residence), composed of medium and large sandstone stones. Smooth masonry was sealed with a solution of lime, sand and gravel.
The oldest part of the building, belonging to the early Middle Ages, is a cylindrical tower located on the top of a hill, on the north-western side of the walled area; only a few rows of hewn stone are preserved from it. Nevertheless, the area surrounded by the wall can still be distinguished, thanks to the preserved ruins. It seems that in the XI century a Romanesque-style chapel was erected in the perimeter, adjacent to the southern wall, and a fragment of the side wall was preserved from it.
The second phase of construction surrounded the original core of the castle and the church with thick walls, stretching in a southerly direction, to the east and west, with numerous outbuildings, which later, from the Late Middle Ages to the XVI and XVII centuries, would be rebuilt many times. The final touch was the construction of the belfry in a Baroque style.
In the main wall you can find a doorway, which is a semi-circular arch, framed by stones, above which are preserved embrasures. A baroque belfry with five openings was added to the upper edge of the wall, four of which make up the lower tier, and the fifth is crowned by a structure. All openings – of unequal width – are completed with semi-circular arches resting on a small platform. The curved contour of the belfry resembles an onion, crowned by a ball resting on a small square console; two side turrets end with the same decorative element.