Muhammad al-Tawil of Huesca
Muhammad ibn Abd al-Malik al-Tawil (, died 913 or 914) was a Muwallad Wāli of Huesca and a prominent Muslim lord in the Upper March (, "Aṯ-Ṯaḡr al-Aʿlà") of Al-Andalus in the late-ninth and early-tenth centuries. Acting autonomously from his nominal masters the Emirs of Córdoba, he carried out his own foreign policy and fought both Christian and Muslim regional rivals, including the Counts of Barcelona, Pallars and Aragon, the King of Pamplona and the Banu Qasi of the Upper March. From him arose a short-lived dynasty, the Banu  al-Tawil (), who would rule Huesca, Barbastro and Lleida, off and on, for a century, eventually losing out to the Banu Tujib of Zaragoza. Background. Muhammad al-Tawil was son of Abd al-Malik ibn Abd Allah ibn Shabrit, a local lord in the region of Huesca. He was a scion of the Banu Shabrit clan (), the descendants of Shabrit, a late-eighth-century relative and ally of rebel Amrus ibn Yusuf. On 12 March 887, Muhammad killed the great-grandson of Amrus, Mas'ud ibn Amrus, governor of Huesca, and seized power there. Rivalry with the Banu Qasi. In 889/90 , Isma'il ibn Musa of Lleida, a member of the rival Banu Qasi, rose in rebellion against the Emirate. Muhammad ambushed an army led by Isma'il's sons, Musa and Mutarrif, leading to the death of Musa and 300 of his soldiers and the capture of Mutarrif. This defeat and the subsequent death of Isma'il ended the rebellion and al-Tawil petitioned the Emir to be given the lands of Isma'il. Instead emir Abd Allah returned the territory to the Banu Qasi, specifically to Muhammad ibn Lubb al-Qasawi, nephew of the rebel. In 893, al-Tawil witnessed a charter of  king Fortún Garcés of Pamplona, appearing as 'pagan' "Mohomat Atavel in Osca" along with his rival Muhammad ibn Lubb. Three years later he again came to blows with the Banu Qasi. Muhammad al-Tawil mobilized his troops to oppose plans by Lubb ibn Muhammad, the son of the Banu Qasi head, to fortify or refortify Monzón. They fought a battle in which Lubb's undermanned and poorly equipped army was nonetheless able to rout the men of al-Tawil and capture his brother Furtun. In 898, the death of Muhammad ibn Lubb al-Qasawi while besieging Zaragoza presented Muhammad al -Tawil with an opportunity to recover lost ground, but Lubb ibn Muhammad returned from negotiations with another Muwallad rebel, Umar ibn Hafsun, to again defeat al-Tawil, this time capturing him. He was forced to cede Barbastro and lands between Huesca and Monzón and to pay 100,000 gold dinars as well as to give his son Abd al-Malik and daughter Sayyida as hostages to insure delivery of the money. Lubb subsequently married Sayyida and forgave the unpaid half of the ransom. Nothing is heard of al-Tawil over the next few years, perhaps because he had turned his armies  against his Christian neighbors to the north in campaigns that escaped notice of the Cordoba-based chroniclers of Al-Andalus. He next appears in 906/7, taking the castles of Barbastro and Alquézar and the region of "Al-Barbitanya" from Lubb ibn Muhammad. Wars against the Christian North. In October 908, Muhammad al-Tawil launched a campaign against the County of Pallars. The castellan of Roda sent emissaries to sue for peace, offering tribute, but al-Tawil rejected them and destroyed the castle. He launched another attack on Monte Pedroso and Oliola, taking 300 prisoners whom he ransomed for 13,000 gold  pieces. In 911, al-Tawil marched north, passing through the territory of his brother-in-law Count Galindo Aznárez II of Aragon. He then met up with Abd Allah, brother of Lubb ibn Muhammad al-Qasawi, for a strike against Pamplona. While the campaign experienced initial success, Sancho I of Pamplona eventually routed the southern troops and reasserted Pamplona's role as feudal lords over Galindo's Aragon. The next year saw Muhammad al-Tawil launch a campaign against Sunyer, Count of Barcelona, forcing him to flee the field of battle. However a second Barcelona campaign resulted in the death  of Muhammad al-Tawil on 23 October 913. Family and legacy. Muhammad al-Tawil married Sancha Aznarez, daughter of Aznar Galíndez II of Aragon and maternal granddaughter of García Íñiguez of Pamplona. By her he had five children, sons Abd al-Malik, Amrus, Furtun, and Musa Aznar, and one daughter, Sayyida (called Velasquita in the "Códice de Roda") who married Lubb ibn Muhammad al-Qasawi. He also had sons Yahya, Lubb and perhaps Walid, presumably to a different woman. While always nominally a vassal of Córdoba, the rebellious, semi-autonomous actions of the Banu al-Tawil along with those of  their rivals the Banu Qasi set the stage for their Banu Tujib and Banu Hud successors to establish a fully independent taifa state in what had been the Upper March of the Caliphate. Family tree.