The threat presented by an invasion by the Mongols led to Qutuz seizing the sultanate in 1259 and uniting with another faction led by Baibars to defeat the Mongols at Ain Jalut. The Mamluks then quickly gained control of Damascus and Aleppo before Qutuz was assassinated, most probably by Baibers.