An army led by the Mamluk Sultan Nasir-ad-Din Faraj was defeated by Timur outside Damascus leaving the city at the mercy of the Mongol besiegers.[8] With his army defeated, the Mamluk sultan dispatched a deputation from Cairo, including Ibn Khaldun, who negotiated with him, but after their withdrawal he put the city to sack.[9] The Umayyad Mosque was burnt and men and women taken into slavery.