title: Abu'l-Qasim al-Husayn ibn Ali al-Maghribi
text: # Abu'l-Qasim al-Husayn ibn Ali al-Maghribi
  
  Abu'l-Qasim al-Husayn ibn Ali al-Maghribi (Arabic: أبو القاسم المغربي; Aleppo, May 981 – Mayyafariqin, 1027), also called al-wazir al-Maghribi ("the Western Vizier") and by the surname al-Kamil Dhu'l-Wizaratayn ("Perfect Possessor of the Two Vizierates"), was the last member of the Banu'l-Maghribi, a family of statesmen who served in several Muslim courts of the Middle East in the 10th and early 11th centuries. Abu'l-Qasim himself was born in Hamdanid Aleppo before fleeing with his father to Fatimid Egypt, where he entered the bureaucracy. After his father's execution, he fled to Palestine, where he raised the local Bedouin leader Mufarrij ibn Daghfal to rebellion against the Fatimids (1011–13). As the rebellion began to falter, he fled to Iraq, where he entered the service of the Buyid emirs of Baghdad. Soon after he moved to the Jazira, where he entered the service of the Uqaylids of Mosul and finally the Marwanids of Mayyafariqin. He was also a poet and author of a number of treatises, including a "mirror for princes".
  
  ## Life
  
  ### Early life and career in the Fatimid court
  
  Abu'l-Qasim al-Husayn was the son of Abu'l-Husayn Ali ibn al-Husayn al-Maghribi, himself the grandson of the family's founder, Abu'l-Hasan Ali ibn Muhammad al-Maghribi, a Persian official who had originally served at the Abbasid court of Baghdad as head of the diwan al-maghrib, the "Bureau of the West", whence the family's nisbah of "al-Maghribi". In the late 940s, Abu'l-Qasim's grandfather entered the service of the Hamdanid Emirate of Aleppo, serving as a secretary (katib) under Emir Sayf al-Dawla (r. 946–967), a post to which he was followed by Abu'l-Qasim's father Ali.
  
  According to the 13th-century Aleppan historian Ibn al-Adim, Abu'l-Qasim was born in May 981 in Aleppo. The later Egyptian historian al-Maqrizi reports that he was born in Egypt instead, but this is in all likelihood incorrect. In 989/90, Abu'l-Qasim was forced to flee the Hamdanid domains when his father Ali sided with the rebellious governor of Homs, Bakjur, in his effort to capture Aleppo from Sayf al-Dawla's son and heir, Sa'd al-Dawla (r. 967–991). Ali defected to the rebel camp, but Bakjur's assault failed, and the Banu'l-Maghribi were forced flee to Egypt and the "lusher pastures of the Fatimid court", in the words of Hugh N. Kennedy. In Egypt, Ali rose to senior posts in the caliphal administration, while Abu'l-Qasim received his education as a katib, and in the early reign of Caliph al-Hakim bi-Amr Allah (r. 996–1021) acquired an influential position in the Diwan al-Sawad (the fiscal bureau responsible for the land tax).
  
  ### Flight from Egypt and the Jarrahid revolt
  
  Soon, however, the Banu'l-Maghribi became involved in the intrigues between various factions of the Fatimid court, and in 1009/10, the powerful Christian vizier, Mansur ibn Abdun, convinced al-Hakim to have all the members of the family executed. According to the poet Ibn al-Qarih, who had been tutor to the Banu'l-Maghribi before the massacre, Abu'l-Qasim was largely responsible for this turn of events: in a polemical text (hija) written against him, Ibn al-Qarih accused him of "having been the indirect instigator of his family's ruination through his own intrigues" (P. Smoor). This provoked the reaction of the famous Syrian poet Abu'l-Ala al-Ma'arri, who had been in contact with Abu'l-Qasim and later wrote an elegy on the latter's death; nevertheless, in the exchange of letters that followed al-Ma'arri himself recognized that Abu'l-Qasim's intrigues played a role, although he tried to minimize this by ascribing them to "youthful ambition and inexperience, and their terrible result as being the ultimate effect of crushing Fate".
  
  Abu'l-Qasim was the only one of his family to escape death, and fled to the Jarrahids of Palestine in 1011. Driven by a flaming desire to avenge himself upon the Caliph, he persuaded the Jarrahid emir, Mufarrij ibn Daghfal ibn al-Jarrah, to raise the Bedouins in open rebellion against al-Hakim. The revolt spread swiftly through the Palestinian hinterland. Even the provincial capital, Ramlah, fell to the Bedouin, and the coastal cities were besieged, but not taken. Abu'l-Qasim went as far as orchestrating the proclamation of an anti-Caliph, the Alid Sharif of Mecca, Abu'l-Futuh al-Hasan ibn Ja'far, in July 1012. Despite the rebellion's initial success, the Jarrahids were susceptible to bribery by the Caliph and did not inspire trust in their confederates: dismayed by the lack of respect shown to him by the Jarrahids, Abu'l-Futuh abandoned the revolt and returned to Mecca, while Abu'l-Qasim himself fled to Iraq.
  
  ### Later career in Iraq and the Jazira
  
  In Iraq, Abu'l-Qasim tried to seek refuge in the Abbasid administration (then under Buyid control). Ibn al-Adim reports that the Abbasid caliph, al-Qadir (r. 991–1031) was initially suspicious of Abu'l-Qasim's intentions due to his nisbah, which implied Fatimid sympathies, and Abu'l-Qasim was forced to remain at Wasit until the true origin of his surname could be explained.
  
  From the Baghdad court, he switched to the service of the Uqaylid ruler of Mosul, Qirwash ibn al-Muqallad, as his vizier, before entering the court of Nasr al-Dawla ibn Ahmad, the Marwanid ruler of Mayyafariqin. He then returned briefly to Baghdad to serve as vizier under al-Qadir, but soon fell out with the Caliph due to his support for pro-Alid factions in Kufa, and was forced to return to Nasr al-Dawla's service, where he remained as vizier until his death in 1027. In accordance with his will, he was buried in Karbala.
  
  ## Writings
  
  Abu'l-Qasim was also an author and poet of some note. His more important works were a compilation of Ibn al-Sikkit, a work on Arab tribal nomenclature, and a short manual on statecraft, or "mirror for princes", the Kitab fi'l-si'yasa, probably written for his patron, Nasr al-Dawla ibn Ahmad. In his work, al-Ma'ari records al-Maghribi's possession of a precious library. It survived long after his death in Mayyafariqin, where Ibn Shaddad reported it as still extant two centuries later.
  
  ## Legacy
  
  Abu'l-Qasim's alleged conversations with the Nestorian archbishop Elijah of Nisibis form the basis of that cleric's Book of Sessions (Arabic: Kitāb al-Majālis), covering religious, literary, and linguistic topics.
  
  