It was the Mamluks. A Mamluk was a soldier who converted to Islam, and over the time that the military used, they became stronger and more powerful military. This was the only way and the only war that the Mongols lost.