 The Mamluks gained control over Syria in the 1260s, and organized the region into kingdoms subordinate to the sultanate in Cairo.Ar-Rastan became the southernmost town of Mamlakat Hama ("Kingdom of Hama") near the border with Mamlakat Hims.In a major battle at a place between the town and Homs, the Mamluks under Qalawun decisively defeated the invading Mongol army of the Ilkhanate in 1281.