In the 7th century AH / 13th century AD, after the Mongols under Hulagu Khan had attacked Aleppo and damaged the Great Mosque, the Mamluks extensively rebuilt it, replacing the wooden ceiling of the prayer hall by stone vaults on pillars. The mihrab was replaced by the Mamluk sultan Qalawun; his name is indicated above the present one, together with that of his governor, the Mamluk prince Qarasunqur al-Jukandar, and the date 684 AH / 1285 AD: “In the name of God, the Entirely Merciful, the Especially Merciful. It was commanded to be built after it was burned by Our Master the greatest Sultan, al-Malik al-Mansur Sayf al-Dunya wa l-Din Qalawun, may God enhance his victory. By the high advice of the master, al-Amir Shams al-Din Qarasunqur al-Jukandar al-Maliki al-Mansuri. The governor of the guarded principality of Aleppo, may God reward and guard him, in the month of Rajab of the year six hundred and eighty-four [September 1285 AD]”.