Lubb ibn Muhammad ibn Lubb (? - 907), in Arabic لب بن محمد بن لب, was a wali of Tudela (890-907) and Larida, as well as a prominent Muslim lord in the Upper March (Arabic: الثغر الأعلى , Aṯ-Ṯaḡr al-Aʿlà) of Al-Andalus.
Lubb was a member of the prominent Muwallad Muslim Banu Qasi clan; being the son of Muhammad ibn Lubb and descendant of Musa the Great). His siblings were Musa ibn Muhammad, Yusuf ibn Muhammad, Abdallah ibn Muhammad, Yunus ibn Muhammad and Mutarrif ibn Muhammad. The brothers began to quarrel among themselves, provoking the complete dismantling of Banu Qasi dynasty's power.
Lubb ibn Muhammad had three sons:Abdallah ibn Lubb
Muhammad ibn Lubb
Furtun ibn Lubb, later converted to Christianity.
In 899 because of a paralysis, Isma'il ibn Musa ceded power to Mutarrif ibn Muhammad and Musa ibn Muhammad. These two went on a joint expedition to Barbitanya, where Musa and Mutarrif were captured by the wali of Huesca, Muhammad al-Tawil. Al-Tawil then launched a counter-attack which ended in the conquest of Larida. Ummayyad emir Abdallah ibn Muhammad decided to deny control of the city to Al-Tawil, and instead awarded it to Lubb's father, who then ceded it to his son Lubb.
From his base of Larida, Lubb ibn Muhammad fought constantly against Christian nobles from Aragon and Catalan counties, who were slowly expanding south and repopulating the extensive areas south of the Pyrenees, and frequent in Christian and Muslim raids and counter-raids ensued. In this context, Lubb ordered the fortification of several towns, such as Larida, where he constructed its As-Sudd (Arabic: السد) or Al-Qaṣabah, also called "Castell del Rei", some time after the Christian conquest, as well as Monzón and Balaguer, constructing its famous Ḥiṣn Balagî or "Castell Formós". He also ordered the construction of the major mosque (Arabic: مسجد الجامع, Masjid al-Jāmiʿ) of Larida, on the grounds of the modern-day Seu Vella.
In 897, Lubb attacked the county of Barcelona, and his army mortally wounded Gothic count Wilfred the Hairy, who died later on August 11 from his injuries, probably not too far away from the castle of Aura.
Lubb's forces seized Tudela and Tarazona (899), attacked Alava and temporarily conquered Toledo. They even went as far as Jaén's countryside, which they left ravaged.
In another raid in 904, Lubb's forces clashed with those of Raymond I of Pallars, achieving the greatest extent of Lubb's domains. His forces then ravaged and plundered Pallars, killing some 700 people and taking about 1000 captives, among them the count's own son, Isarn.
However, in 905 his ally Fortún Garcés of Pamplona was deposed by Sancho I of Navarre, nephew of the count of Pallars. In 907, Lubb ibn Muhammad tried to help Fortún by attacking Pamplona, but the results of the expedition were disastrous. Soon after, Lubb fell into an ambush prepared by Sancho, and was assassinated.
With Lubb's death, the wali of Huesca and longtime rival of Lubb and his father, Muhammad al-Tawil, made himself wali of Larida, ejecting Lubb's son, Furtun ibn Lubb.