In obeying Am-Nasir Yusuf and joining the Mamluk army, Al-Mansur took a decisive step which was to restore him to Hama, albeit under Mamluk suzerainty. The Mamluk army headed north to Ain Jalut where they inflicted a decisive defeat on the Mongols, turning back their invasion in a way which was almost unprecedented in the Mongol experience. Al Mansur served with distinction during the battle, and was restored to his domains in Hama as a Mamluk vassal. His loyalty thereafter to the Mamluks meant that while the other Ayyubid states were gradually absorbed by them over the next few years, Hama remained under Ayyubid rule until 1341, longer than any other Syrian city.