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.
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.
[4] On 9 Dhu al-Qi'dah (26 August 1395) upon receiving word of Ali's death Barquq freed Hasan and appointed him Emir of Mecca.
At the same time al-Nasir raised Hasan to the newly created post of Vice Sultan (or Viceroy) in the Hejaz (na'ib al-saltanah bi'l aqtar al-Hijaziyah), giving him supervisory authority over Mecca, Medina, Yanbu, Khulays, and al-Safra.
[9] 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).
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.
[14][15] 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.
[18] On 20 Jumada al-Thani 815 AH (27 September 1412) Hasan and his sons received robes of honor and a letter from the new Sultan of Egypt, 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 successor to al-Musta'in, the Egyptian Sultan Al-Mu'ayyad Shaykh.
Sultan al-Mu'ayyad responded to the entreaty and sent Hasan a robe of honor and a decree, dated 18 Ramadan 819 AH (9 November 1416), returning him the Emirate of Mecca.
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.
On 12 Rabi al-Awwal 824 AH (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.
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).