Lubb ibn Muhammad, after defeating Wilfred the Hairy by mortally wounding him in the raid of 897, decided to build an important fortress in Balaguer, which in the 11th century became a palace. The name Suda, which he acquires at that time, indicates the double defensive and lordly character.
With the conquest in 1105, the Counts of Urgell occupied the Suda to temporarily make it their residence, and set themselves the target of capturing Lleida, which was put within reach with the siege of Corbins in 1116, which was recovered by the Muslims in 1126, and the taking of the territory surrounding Balaguer was not completed until 1130.[6]
^Brufal Sucarrat, Jesús (2007). "La sociedad almorávide en el distrito de Lérida (1102-1146). La representación del poder mediante las propiedades rurales". Medievalismo (17): 20.