Uqaylid dynasty

The Uqaylid dynasty (العقيليون) was a Shia Arab dynasty with several lines that ruled in various parts of Al-Jazira, northern Syria and Iraq in the late tenth and eleventh centuries. The main line, centered in Mosul, ruled from 990 to 1096.

Rise
The Uqaylids were descended from the Banu Uqayl and were Shi'a. They first came to power in Diyar Bakr when they were granted land there by the Buwayhids, who hoped that they would serve as a buffer against the Kurd Bādh ibn Dustak. Soon afterwards the 'Uqaylids forged an alliance with the Hamdanids, who had been expelled from Mosul by the Buwayhids in 979. Together the two of them moved against the Buyids and Mosul and the Diyar Rabi'a was occupied in 989. The Uqaylid leader, Muhammad ibn al-Musayyab, then fought against Bādh, which eventually resulted in the death of the Kurdish rebel. Following this, Muhammad turned against the Hamdanids and defeating them as well. He also forced the Buwayhid governor of Mosul to grant him half of his dependencies.

Uqaylids of Mosul
Muhammad ibn al-Musayyab died in 996. He was succeeded by his brother al-Muqallad, who in that same year marched on Mosul, forcing its Buwayhid governor to flee. From there the Uqaylids advanced into Iraq; they succeeded in overrunning much of the country and even raiding Baghdad. Eventually the Buwayhid amir Baha' al-Dawla came to terms with al-Muqallad, whereby the Uqaylid was invested by the Abbasid caliph with the rule of Mosul, Kufa and Jami'yan. He was also given the title of "Husam al-Dawla". The treaty made al-Muqallad nominally subservient to the Buwayhids, but in effect he was independent, refusing to pay the tribute that he owed.

Despite the treaty, al-Muqallad still desired to take Baghdad, and might have done so had he not been assassinated by one of his Turkish slaves in 1001. This marked the beginning of the long reign of al-Muqallad's son, Qirwash. In 1002 Qirwash raided Buwayhid territory, prompting Baha' al-Dawla's governor of Baghdad to undertake an expedition against the Uqaylids. Defeated at first, he eventually managed gain a victory over them near Kufa, but at this point was removed from his post as governor, preventing him from following up on this success. In 1005 Qirwash was confirmed in all of his possessions by the caliph, who gave him the title "Mu'tamid al-Dawla".

Qirwash's major problem during the second half of his reign was finding a way to control the Oghuz Turks who were coming in from Iran. The Oghuz even managed to occupy and sack Mosul in 1044, although Qirwash was able to expel them with the support of the Mazyadids. In 1050 Qirwash was removed from power by his brother Baraka ("Za'im al-Dawla"), who reigned until 1052 when he died. Baraka's son Quraysh ("Alam al-Din") succeeded him and ruled for the next nine years. During his reign he acknowledged the supremacy of the Seljuk Empire, although he later came into conflict with them and was temporarily expelled from Mosul. He accompanied the Turk Basasiri when the latter took Baghdad at the end of 1058, but the Seljuks retook the city in the next year.

Quraysh died in 1061 and was followed by his son Muslim ("Sharaf al-Dawla"). Sharaf al-Dawla was a just ruler; the Uqaylid domains were relatively stable for most of his reign. He furthermore gained Aleppo from the Mirdasids in 1080 when its inhabitants offered to hand the city over to him in the hopes that he could protect from Seljuk raids, and he took Harran from the Numayrids in the following year. Soon, however, he ran into trouble with the Seljuks himself. He fought against Sultan Malik Shah's forces and was defeated, but he was pardoned and reinstated. In 1085 he was killed fighting the Seljuks of Süleyman b. Qutulmush. Following Sharaf al-Dawla's death, his brother Ibrahim, who had previously been imprisoned, was released and declared as his successor. Süleyman meanwhile had been killed in the battle of Ain Salm by Tutush, the brother of Malik Shah and ruler of Damascus, and Malik Shah himself took Aleppo in 1086 and appointed Aksungur as governor of the city.

In 1089 or 1090 Ibrahim was summoned to the court of Malik Shah. When he arrived he was imprisoned and was kept close to Malik Shah's side. Mosul during this time was managed by the Seljuk governor Fakhr al-Dawla ibn Jahir. When Malik Shah died in 1092 a fight between Sharaf al-Dawla's sons Ali and Muhammad ensued. Ali was brought by his mother Safiyya to Mosul, but Muhammad attempted to take the city for himself. In a battle at Mosul he was defeated and forced to flee. Ibrahim, meanwhile, had been released by Malik Shah's widow so he returned to Mosul, and eventually convinced Safiyya to give up the city to him.

Ibrahim managed to keep his renewed power for only a short time. The emir of Damascus, Tutush, demanded that he recognize him as sultan in the khutba and allow him passage through his territory. Ibrahim refused, prompting Tutush to move his army against him. The two sides met outside Mosul on 2 April 1093, and in the ensuing battle Ibrahim and his uncle were killed in a bloody battle. Tutush then installed Ali and his mother Safiyya as his representatives in Mosul.

Muhammad b. Sharaf al-Dawla continued to attempt gain Mosul. He recruited the Turkish commander Kerbogha and his brother Tuntash, but Kerbogha imprisoned him. He then attempted to take Mosul from Ali but failed. Kerbogha then executed Muhammad and tried again to take Mosul. As the siege continued, Ali decided to flee to the Mazyadids. Kerbogha eventually gained control of the city in late 1096 and became its amir, ending 'Uqaylid rule there.

Other Uqaylids
Several other Uqaylid lines were established in various areas, including Jazirat ibn Umar, Takrit, Hit, and Ukbara (whose ruler, Gharib ibn Muhammad once gave refuge to the Buwayhid amir Jalal al-Daula when he found it necessary to leave Baghdad). Some of these lines were still extant after the overthrow of the Uqaylids in Mosul, with one branch in Raqqa and Qal'at Ja'bar lasting until 1169 when it was ended by the Zengids.

List of Uqaylid rulers

 * Muhammad ibn al-Musayyab (c. 990–996)
 * al-Muqallad ibn al-Musayyab, brother of Muhammad, known as Husam al-Dawla (996–1001)
 * Qirwash ibn al-Muqallad, known as Mu'tamid al-Dawla (1001–1050)
 * Baraka ibn al-Muqallad, brother of Qirwash, known as Za'im al-Dawla (1050–1052)
 * Quraysh ibn Baraka, known as Alam al-Din (1052–1061)
 * Muslim ibn Quraysh, known as Sharaf al-Dawla (ruled 1061–1085)
 * Ibrahim ibn Quraysh, brother of Muslim (1085–1089/90 and 1092–1093)
 * Ali ibn Muslim (1089/90–1092 and 1093–1096)