Hasan ibn Ajlan
Badr al-Dīn Abū al-Ma‘ālī Ḥasan ibn ‘Ajlān ibn Rumaythah ibn Abī Numayy al-Ḥasanī () was Emir of Mecca from 1396 to 1426 with interruptions, and the first Vice Sultan in the Hejaz from 1408 to 1416. Early life. Hasan was born around 775 AH (1373/1374), son of the Emir of Mecca Ajlan ibn Rumaythah (d. 1375). After his father's death Hasan and his brother Ali ibn Ajlan were raised by their elder brother, the Emir of Mecca Ahmad ibn Ajlan (d. 1386). In Dhu al-Hijjah 789 AH (December 1387) Ali ibn Ajlan assumed  the Emirate. Hasan traveled to Egypt to secure support for his brother's reign, returning to Mecca a few months later, either in Rabi al-Thani or Jumada al-Awwal (April/May 1388). On his return he reinforced Ali with a troop of fifty Mamluk horsemen and delivered him the robe of honor and letter of confirmation from Sultan al-Zahir Barquq. Though Hasan enjoyed good relations with his brother during much of the latter's reign, rivalry between the two sharifs twice broke into open conflict. On both occasions Hasan attempted to capture Mecca and overthrow Ali. The first  time was in early 792 AH (c. early 1390), and the second time was in Jumada al-Thani 797 AH (March/April 1395). After twice failing to take the Emirate by force, Hasan went to Egypt seeking support for his cause. In Ramadan (June/July 1395) of that year Sultan Barquq arrested Hasan and imprisoned him in Cairo Citadel. On 7 Shawwal (28 July 1395) Ali was killed, only a week after receiving news of Hasan's capture, and was succeeded by his brother Muhammad ibn Ajlan. First reign. On 9 Dhu al-Qi'dah (c. 26 August 1395) upon receiving  word of Ali's death Barquq freed Hasan and appointed him Emir of Mecca. News of his appointment reached Mecca in the last ten days of Dhu al-Qi'dah (September 1395). Since Hasan himself had not yet arrived, Muhammad ibn Ajlan continued to serve as Emir. Hasan finally reached Mecca on Saturday night, 24 Rabi al-Thani 798 AH (4 February 1396). After entering the city he was invested with the robe of honor and proclaimed Emir of Mecca. In 809 AH (1406) Hasan successfully petitioned Sultan al-Nasir Faraj to appoint his son Barakat as co-Emir of Mecca . Barakat's diploma of investiture, dated Sha'ban 809 AH (January/February 1407), arrived in Dhu al-Hijjah (May 1407). In 811 AH (1408) Hasan had al-Nasir appoint his son Ahmad coregent alongside Barakat. At the same time al-Nasir raised Hasan to the newly created post of Vice Sultan (or Viceroy) in the Hejaz (), giving him supervisory authority over Mecca, Medina, Yanbu, Khulays, and al-Safra. Robes of honor for Hasan and his sons reached Mecca in the second half of Rabi al-Thani (September 1408) along with a decree dated mid-Rabi al-Awwal 811 AH (August 1408 ). Al-Nasir also sent a decree appointing Thabit ibn Nu'ayr as Emir of Medina. Thabit was the uncle of Hasan's wife, and Hasan had proposed his appointment to the Sultan earlier that year. However, since Thabit died before the arrival of al-Nasir's decree, Hasan exercised his new prerogatives as Vice Sultan by issuing a decree appointing Thabit's brother Ajlan ibn Nu'ayr, his father-in-law, to the Emirate of Medina. He also sent a contingent of troops to Medina under the command of his son Ahmad to remove the previous Emir Jammaz ibn Hiba. After Ajlan  assumed Emirate, the "khatib" in Medina was ordered to mention in the sermon first the name of Sultan al-Nasir Faraj, second the name of Hasan ibn Ajlan, and third the name of the Emir of Medina. In 812 AH (1410) Hasan fell from favor and al-Nasir ordered the Egyptian "amir al-hajj" Emir Baysaq to arrest him along with his sons. Baysaq assembled an army and on reaching Yanbu announced that the Sultan had deposed Hasan and his sons. Hasan received the news on 10 Dhu al-Qi'dah, and by the end of the month he had assembled  an army of 600 horsemen and over 6000 soldiers to fight Baysaq. In the meantime, al-Nasir decided against removing Hasan and ordered Baysaq to stand down. To Mecca he sent the messenger Fayruz al-Saqi bearing robes of honor and a decree dated 12 Dhu al-Qi'dah which reinstated Hasan, Barakat, and Ahmad to their offices. During this time, Ghiyathuddin Azam Shah, the Sultan of Bengal, commissioned some money in order to buy property for establishing and maintaining the two Ghiyathiyyah Madaris located in Makkah and Madinah - which were considered to be the best institutions in the region. An  account of these can be found in the Tarikh Makkah (History of Makkah). Azam Shah also sent a lot of money to repair the Arafat Stream. Hasan, however, decided to use the money given by the Sultan for another project instead. On 20 Jumada al-Thani 815 AH (c. 27 September 1412) Hasan and his sons received robes of honor and a letter from the new sultan, the Caliph Musta'in Billah. However, the mention of the Caliph's name in the "dua" and "khutbah" of Mecca was short-lived, for in Shawwal (January 1413) they received robes of honor and  a letter from the new sultan, al-Mu'ayyad Abu al-Nasr Shaykh. On 14 Safar 818 AH (c. 25 April 1415) the Sultan issued a decree appointing Rumaythah ibn Muhammad ibn Ajlan as Vice Sultan in the Hejaz and Emir of Mecca in place of his uncle and cousins. Rumaythah received the decree 16 Rabi al-Awwal 818 AH (c. 26 May 1415), but the "du'a" in Mecca continued in the name of Hasan and his sons until Rumaythah entered Mecca in the beginning of Dhu al-Hijjah (February 1416). Second reign. In Rajab 819 AH (September 1416) Hasan sent  Barakat to Cairo to petition for his reappointment. Sultan al-Mu'ayyad responded to the entreaty and sent Hasan a robe of honor and a decree, dated 18 Ramadan 819 AH (c. 9 November 1416), returning him the Emirate of Mecca. He entered Mecca and was proclaimed Emir on Wednesday, 26 Shawwal (16 December 1416). In the second half of Shawwal 820 AH (November/December 1417) Barakat arrived from Egypt as Hasan's coregent. The following year in Rabi al-Awwal (April/May 1418) Hasan ordered those in his service to pledge allegiance to Barakat, thereby indicating his intention to cede  the bulk of his duties to his son. In 823 AH Hasan requested al-Mu'ayyad to appoint his son Ibrahim coregent with Barakat. On 12 Rabi al-Awwal 824 AH (c. 17 March 1421) he received a decree, dated Safar 824 (February 1421) and in the name of the new sultan al-Muzaffar Ahmad, that confirmed Hasan and Barakat as Emirs but did not mention Ibrahim. As a result the brothers quarreled and Ibrahim left for Yemen. He returned to Mecca with a group of his supporters and ordered the "mu'adhdhin" to insert his name in the "dua" alongside his  father and brother. This continued until 826 AH (1423), when Hasan ordered for Ibrahim's name to be removed. In 825 AH (1422) the Sultan al-Ashraf Barsbay appointed Rumaythah ibn Muhammad Emir of Mecca. The latter was in Yemen, however, and nothing came of his appointment. When the "amir al-hajj" Fayruz al-Nasiri reached Mecca Hasan came out to receive the "mahmal" as usual, even though he had already received word that he had been deposed. When Emir Fayruz returned to Egypt he delivered Barbay a large tribute from Hasan and spoke well of the latter's governance  as Emir of Mecca. Barsbay was appeased and sent Hasan confirmation of his rule. On Friday, 15 Rabi al-Thani 827 AH (17 March 1424), news reached Mecca that Ali bin Inan ibn Mughamis was on his way from Egypt with an army, having been appointed Emir of Mecca by Sultan Barsbay. After a few days Hasan left towards Yemen, allowing Ali to enter the city without bloodshed on Thursday, 6 Jumada al-Awwal 827 AH (6 April 1424). Third reign. In 828 AH Barsbay deposed Inan from the Emirate. Qadi Najm al-Din ibn Zahirah and the "amir al -hajj" Emir Taghri Birdi al-Mahmudi delivered the news to Hasan in al-Lith that he was reinstated as Emir of Mecca on the conditions that he return to Mecca to receive the Hajj, and that he afterwards appear before the Sultan in Cairo. Hasan sent Barakat back to Mecca where the "amir al-hajj" swore an oath to Barakat at the Black Stone that neither he nor the Sultan bore any malice towards Hasan. Barakat returned to his father, then they entered Mecca together and resumed their offices on Wednesday, 4 Dhu al-Hijjah (17 October 1425). After performing  the Hajj Hasan accompanied the "amir al-hajj" to Cairo, leaving Barakat in Mecca. He arrived on 24 Muharram 829 AH and was received with great honor. On 27 Muharram Barsbay confirmed Hasan as Emir of Mecca after he agreed to pay the sum of thirty-thousand dinars. Hasan was kept as an honored hostage in Cairo until the first installment of five-thousand dinars arrived. On 20 Jumada al-Awwal (c. 30 March 1426) Hasan departed for Mecca. After falling ill he returned to Cairo, where died on Thursday night, 17 Jumada al-Thani 829 AH (25 April 1426