 Lajin was unable to retain the sultanate and al-Nasir Muhammad was restored to power in 1298, ruling a fractious realm until being toppled a second time by Baybars II, a Circassian "mamluk" of Qalawun, who was known to be more wealthy, pious and cultured than his immediate predecessors.Early into an-Nasir Muhammad's second reign, the Ilkhanids, whose leader, Mahmud Ghazan, had converted to Islam, invaded Syria and routed a Mamluk army near Homs in the Battle of Wadi al-Khazandar.However, Ghazan withdrew most of his troops from Syria shortly after due to a dearth in fodder for their numerous horses and the residual Ilkhanid force retreated in 1300 at the approach of the rebuilt Mamluk army.