Feeling uneasy when the Syrian Emirs refused to pay homage to Shajar al-Durr and granted
Damascus to
an-Nasir Yusuf the Ayyubid emir of
Aleppo, Shajar al-Durr married Aybak then abdicated and passed the throne to Aybak after she ruled Egypt for 80 days, starting on May 2, 1250. Aybak, from the end of July 1250 the new sultan of Egypt, was given the royal name al-Malik al-Muizz. Until then, Aybak relied foremost on four Mamluks:
Faris ad-Din Aktai,
Baibars al-Bunduqdari,
Qutuz and Bilban al-Rashidi. Aybak's formal rule ended after just five days. To consolidate his position of Aybak, and attempting to satisfy their opponents in
Syria and Baghdad, the Bahri Mamluks installed the 6-year-old
al-Ashraf Musa, who was one of the Syrian branch of the Ayyubid family as a Sultan and announced that Aybak is merely a representative of the Abbasid Caliph in Baghdad. In addition, and to display his loyalty to his deceased Ayyubid master as-Salih Ayyub, Aybak organised a funeral ceremony for as-Salih and buried him in the tomb which as-Salih had built for himself before his death near his
madrasah in the district of Bain al-Qasrain in
Cairo. Nevertheless, the actual power in Egypt was still exercised by Aybak, who had returned to his position of atabak (atabeg). ==Ayyubid challenge==