Sharifate of Medina

The Sharifate of Medina or Emirate of Medina was an emirate centred on the Islamic holy city of Medina in the Hejaz. It was established during the dissolution of the Abbasid empire in the mid-tenth century, and was ruled by a series of sharifs of the Banu Muhanna dynasty, descendants of Muhammad via Ali ibn Abi Talib and his son Husayn. Like its southern neighbour, the Sharifate of Mecca, which arose at about the same time, the sharifs of Medina were usually obliged to vassalage to the rulers of Egypt, as the two holy cities drew their food supply from there. In the Mamluk period, the Sharifate of Medina gradually lost its autonomy and importance, its emirs being appointed by Cairo and subordinated to the Sharif of Mecca as the vice-sultan of the Hejaz.

Background
The first city converted to Islam and the base for Muhammad's conquest of Arabia, Medina was the first capital of the nascent caliphate. Despite the attempt to return it to Medina during the Second Fitna (680–692), the political seat of the Muslim world quickly shifted permanently away from the Hejaz, first to Damascus under the Umayyad Caliphate (661–750) and then to Baghdad under the Abbasid Caliphate (750–1258). Nevertheless, the unique prestige of Medina and Mecca as the two holy cities of Islam ensured that the caliphs took care to conduct works there, placate the locals with donations and gifts, and maintain order and prosperity; Medina especially appears to have sometimes functioned as the main administrative centre for Arabia or at least the Hejaz, and the caliphal governors appointed to Medina were often members of the ruling dynasties or otherwise high-status members of the Quraysh tribe.

During the later 8th century, Mecca and Medina became the seat of Alid opposition to the Abbasid government, with members of various Alid branches rising in revolt, most notably in 762, 786, 815/16, and 865/66. By the early 10th century, Abbasid control appears to have been nominal at best, and the sources are unclear as to who held power; Medina is reported to have been ruled by the Ja'farids (the Alids' rivals, descendants of Ali's brother Ja'far ibn Abi Talib) at some point. Indeed, during these years it became common for military commanders to be appointed as governors, a testament to the instability of the region. This did not bring the desired results and the anarchy continued, culminating with the Sack of Mecca by the Qarmatians in 930. Unable to ensure the safety of the Hejaz, in 935 and again in 942 the Abbasids handed over jurisdiction for Mecca and Medina to the autonomous Ikhshidid dynasty of Egypt. The two cities were dependent on Egypt already from the first years of the caliphate, as the influx of new inhabitants and the status of the city led to the need to supply them with food imported from Egypt, using the Red Sea ports.

History of the Sharifate of Medina
Medieval sources report that the Hejaz remained under Ikhshidid suzerainty until the Fatimid conquest of Egypt in 969, with the Friday sermon being read in the name of the Ikhshidid emir. But power in the city was seized, already by c. 940, by a Husaynid Alid, Ubayd Allah ibn Tahir, in circumstances that are entirely unknown. Ubayd Allah's successors, the Banu Muhanna dynasty, would rule Medina on and off until the sixteenth century. This development was paralleled a generation later at Mecca, where a Hasanid, Ja'far ibn Muhammad, seized control. The Sharifate of Mecca was much larger and powerful than that of Medina, which apparently controlled little beyond the city's immediate environs. The two emirates would be often in conflict with one another, as the more ambitious sharifs of Mecca tried to include Medina in their domain. The two emirates were also exposed to the rivalries of the great powers of the Muslim world, who by turns wooed and pressured the sharifs to recognize their suzerainty, and exploited dynastic rivalries or used direct military force to impose their preferred candidates as emirs; the sharifs of Medina were adherents of Twelver Shi'ism (as those of Mecca were Zaydi Shi'a), and usually recognized the suzerainty of the Isma'ili Shi'a Fatimid caliphs and mentioned them in the Friday sermon.

Ubayd Allah's son Muslim had settled in Egypt, and was a friend of the Ikhshidid emir, Abu al-Misk Kafur, but appears to have switched his allegiance to the Fatimid caliph al-Mu'izz soon after Kafur's death, even before the Fatimid conquest of Egypt, and may have played a role in the success of the latter. The Friday sermon was read for al-Mu'izz in Medina in 969 or 970, and two years later the Sharif of Medina joined the Fatimids in a campaign that obliged the Sharif of Mecca to acknowledge Fatimid suzerainty as well. After Muslim died in 976/7, his son Tahir returned from Egypt to Medina, where he was acknowledged as emir of the city by the local Alids. Initially acknowledging the suzerainty of the Abbasids, the arrival of a Fatimid army forced him to return to Fatimid allegiance. Later the Banu Muhanna briefly lost control of Medina to the Meccan emir Abu'l-Futuh al-Hasan ibn Ja'far in c. 1000 at the behest of the Fatimids, and again to Abu'l-Futuh's son, Shukr ((r. 1038/9 – 1061)), and to the first Hawashim emir of Mecca, Abu Hashim Muhammad ibn Ja'far ((r. 1062 – 1094)). Otherwise little is known about the history of Medina in the 11th and 12th centuries, and even the exact line of succession between the various branches of the Banu Muhanna is unclear.

More information is available on Qasim ibn Muhanna, who ruled from c. 1170/1180 till the 1190s, as he was a friend and confidant of the Ayyubid sultan of Egypt, Saladin. In 1176, Qasim joined the Hajj caravan to Mecca; the amir al-hajj, Tashtakin al-Mustanjadi, deposed the sharif of Mecca, Mukaththir ibn Isa, and installed Qasim as the new ruler of Mecca. Realizing that his position was untenable, after only three days Qasim handed over power to Mukaththir's brother, Da'ud. Qasim' son and successor, Salim, in turn had to confront the attacks of Qatada ibn Idris, who deposed Mukaththir in 1203 and assumed control of Mecca. Salim was able to secure the assistance of the Ayyubids, and his nephew and successor, Qasim, was able to defeat the Meccans in battle at Wadi al-Safra in 1216. Qasim's attacks on Mecca proved fruitless, and the Ayyubids of Egypt, interested in maintaining a balance of power, switched their support to the Meccans and even garrisoned Yanbu and possible Mecca itself for protection. The long reign of Shihah ibn Hashim that followed (1226/7–1249/50) was peaceful and prosperous, and marked by the close relations with Ayyubid Egypt, which led Shihah to support and even lead repeated Ayyubid attempts to regain control of Mecca, which was being contested by the Rasulids of Yemen.

Shihah's son, Jammaz, continued the attempts to annex Mecca, but was only briefly successful, occupying the city for 40 days in 1271 and a few months in 1288. His reign also marks the start of the tightening of control by the Mamluk Sultanate of Cairo over Medina: in 1283/4 the Mamluks installed a Sunni imam in the Prophet's Mosque, and the Mamluk sultans began to interfere more actively in the affairs of Medina. In this they were aided by dynastic disputes among the Banu Muhanna; by the 14th century, Cairo had arrogated the right to appoint the emir, while the latter was downgraded to the status of a mere Mamluk functionary. The disputes began with Jammaz's twelve sons: the chosen successor, Mansur, was opposed by his brothers Muqbil and Wudayy; both Muqbil and his son, Barjis, turned to Cairo for sanction of their claims to the emirate, while Mansur in turn visited Cairo to secure his own position. Both Mansur and his son and successor, Badr al-Din Kubaysh, lost control of Medina to rival brothers, nephews, or cousin during their absence, and were able to recover it only through Mamluk intercession. Both Mansur and Kubaysh were assassinated by rival family members. Mansur's descendants remained in power after, with the exception of Wudayy ibn Jammaz's rule in 1336–1343, and a period when the family was ousted from Medina in 1350–1357/8.

Finally, in the 15th century, Medina was subordinated to the Sharif of Mecca, who became the 'vice-sultan' of the Hejaz, starting with Hasan ibn Ajlan; but this also meant that both Mecca and Medina, as well as the Hejaz more broadly, gradually became more tightly integrated into the Mamluk empire. By 1426, the Mamluk sultan even demanded the payment of large sums of money from the emirs of Mecca and Medina as a tribute before they were confirmed in office. Emir Ajlan ibn Nu'ayr was deposed when Khashram ibn Dawghan promised to pay Sultan Barsbay 5,000 gold dinars, but Khashram was in turn deposed a year later after failing to forward the sum. By 1439/40, and likely since 1424, when it is attested for Mecca, a small Mamluk garrison was sent yearly to Medina to maintain order and further cement Cairo's control.

Emirs

 * Tahir ibn Muslim ibn Ubayd Allah (976–992), died in office
 * al-Hasan ibn Tahir ibn Muslim (992–1007), deposed in coup
 * Da'ud ibn al-Qasim ibn Ubayd Allah (1007–?)
 * Hani ibn Da'ud ibn al-Qasim
 * Muhanna ibn Da'ud ibn al-Qasim (?–1017/8), died in office
 * Abu'l-Ghana'im ibn Muhanna ibn Da'ud (c. 1017/8), murdered
 * Hashim ibn al-Hasan ibn Da'ud (1036/7–?)
 * al-Husayn ibn Muhanna ibn Da'ud (c. 1076/7)
 * Mansur ibn Umara ibn Muhanna (?–1103/4), died in office
 * NN. ibn Mansur ibn Umara
 * Muhanna ibn al-Husayn ibn Muhanna
 * al-Husayn ibn Muhanna ibn al-Husayn
 * Qasim ibn Muhanna ibn al-Husayn (c. 1170/1180–1190/1200), died in office; briefly Sharif of Mecca in 1176
 * Salim ibn Qasim ibn Muhanna (c. 1190/1200–1215)
 * Qasim ibn Jammaz ibn Qasim (1215–1226/7), assassinated
 * Shihah ibn Hashim ibn Qasim (1226/7–1249/50), assassinated
 * Umayr ibn Qasim ibn Jammaz (1241)
 * Isa ibn Shihah ibn Hashim (1249/50–1251/2), deposed in coup
 * Munif ibn Shihah ibn Hashim (1251/2–1259), died in office
 * Jammaz ibn Shihah ibn Hashim (1251/2–1300/1 or 1302/3; co-emir 1251/2–1259), abdicated; briefly Sharif of Mecca in 1271 and 1288
 * Malik ibn Munif ibn Shihah (co-emir 1266/7–1267/8 and 1269)
 * Mansur ibn Jammaz ibn Shihah (1300/1 or 1302/3 – 1325), assassinated
 * Muqbil ibn Jammaz ibn Shihah (co-emir in 1309/10), killed while trying to seize Medina
 * Wudayy ibn Jammaz ibn Shihah (usurper in 1316/7 and 1326/7, co-emir in 1335, sole emir in 1336–1343)
 * Badr al-Din Kubaysh ibn Mansur ibn Jammaz (1325–1328), assassinated
 * Tufayl ibn Mansur ibn Jammaz (1328–1336 and 1343–1350), deposed
 * Humayan bint Mubarak bint Muqbil (March 1350), de facto emir for two days
 * Sa'd ibn Thabit ibn Jammaz (1350–1351), died of battle wounds
 * Fadl ibn Qasim ibn Jammaz (1351–1354), died in office
 * Mani ibn Ali ibn Mas'ud ibn Jammaz (1354–1357/8), deposed
 * Jammaz ibn Mansur ibn Jammaz (1357/8–1358), assassinated
 * Atiyya ibn Mansur ibn Jammaz (1359–1371/2 and 1381–1382), died in office
 * Hiba ibn Jammaz ibn Mansur (1371/2–1381), deposed
 * Jammaz ibn Hiba ibn Jammaz (1382–1385/6, 1386–1387, 1402–1408, 1409), died in office
 * Muhammad ibn Atiyya ibn Mansur (co-emir in 1383/4, emir in 1385–1386)
 * Thabit ibn Nu'ayr (1387–1402, reappointed in 1408 but died before the decree arrived)
 * Ajlan ibn Nu'ayr (1408–1409, 1409–1410, 1417–1418/9, 1421–1426), deposed
 * Sulayman ibn Hiba ibn Jammaz (1410–1413), deposed
 * Ghurayr ibn Hayaz'a ibn Hiba (1413–1417, 1418/9–1421), deposed
 * Khashram ibn Dawghan ibn Ja'far ibn Hiba (1426–1427), deposed
 * Mani ibn Ali ibn Atiyya ibn Mansur (1427–1435/6), assassinated
 * Umyan ibn Mani ibn Ali (1436–1439, 1446/7–1451), died in office
 * Sulayman ibn Ghurayr (1439–1442), died in office
 * Haydara ibn Dawghan ibn Hiba (1442–1443), assassinated
 * Yunus ibn Kabsh ibn Jammaz (1443), deposed
 * Daygham ibn Khashram ibn Najjad ibn Nu'ayr (1443–1446/7), deposed
 * Zubayri ibn Qays (1451–1461, 1482–1483), died in office
 * Zuhayr ibn Sulayman ibn Hiba (1461–1465, 1465–1469), died in office
 * Dughaym ibn Khashram (1465, 1469–1478), deposed
 * Qusaytil ibn Zuhayr ibn Sulayman (1478–1482), deposed
 * Hasan ibn Zubayri ibn Qays (1483–1495/6), deposed
 * Faris ibn Shaman (1495/6–?)