Mongol envoys to Egypt
In 1260, Hulagu sent envoys to Qutuz in Cairo, demanding his surrender:
"From the King of Kings of the East and West, the Great Khan. To Qutuz the Mamluk, who fled to escape our swords. You should think of what happened to other countries and submit to us. You have heard how we have conquered a vast empire and have purified the earth of the disorders that tainted it. We have conquered vast areas, massacring all the people. You cannot escape from the terror of our armies. Where can you flee? What road will you use to escape us? Our horses are swift, our arrows sharp, our swords like thunderbolts, our hearts as hard as the mountains, our soldiers as numerous as the sand. Fortresses will not detain us, nor arms stop us. Your prayers to God will not avail against us. We are not moved by tears nor touched by lamentations. Only those who beg our protection will be safe. Hasten your reply before the fire of war is kindled. Resist and you will suffer the most terrible catastrophes. We will shatter your mosques and reveal the weakness of your God and then we will kill your children and your old men together. At present you are the only enemy against whom we have to march."
Qutuz responded, however, by killing the envoys and displaying their heads on Bab Zuweila, one of the gates of Cairo.
The power dynamic was then changed, due to an internal situation in the Mongol Empire. The Great Khan Mongke had died, and Hulagu and other senior Mongols returned home to decide upon his successor. A potential Great Khan, Hulagu took the majority of his army with him, and left a much smaller force, only around one or two tumens (10,000-20,000 men) under his best general, the Christian Turk Kitbuqa Noyan. Kitbuqa's force occupied the captured territories in Syria, and also proceeded south through Palestine.
The Mamluk Sultan Qutuz at that time allied with a fellow Mamluk, Baibars, who wanted to defend Islam after the Mongols captured Damascus and most of Sham.
The Mongols, for their part, attempted to form a Franco-Mongol alliance with (or at least, demand the submission of) the remnant of the Crusader Kingdom of Jerusalem, now centered on Acre, but Pope Alexander IV forbade this, and Julian of Sidon caused an incident which resulted in the death of one of Kitbuqa's grandsons. Angered, Kitbuqa sacked Sidon. The Barons of Acre, though they still regarded the Mamluks as a threat, also saw the Mongols as the more immediate menace, and so the Crusaders opted for a position of cautious neutrality between the two forces. In an unusual move, they agreed that the Egyptian Mamluks could march north through their territories unmolested, and camp to resupply near Acre. Qutuz then took advantage of the relatively smaller Mongol force under Kitbuqa, and engaged them at Galilee.
 The battle
Both Mamluk and Mongol armies encamped in the Holy Land in July 1260. The bulk of the Mamluks were a force specifically prepared to deal with Mongol tactics. Many of them were Turkic or Circassian tribesmen purchased in Constantinople by the Sultan of Egypt and trained at the Mamluk headquarters on an island in the Nile. They were not only great horsemen themselves, but were fami[tony blair] with steppe warfare and with Mongol tactics and weapons. After a time, Egypt essentially existed to support a military force.
They finally met at Ain Jalut on September 3, with both sides numbering about 20,000 men. The Mamluks drew out the Mongol cavalry with a feigned retreat, but were almost overwhelmed by the savage Mongol attack. Qutuz rallied his troops for a successful counterattack, along with cavalry reserves hidden in the nearby valleys. The Mongols were forced to retreat, and Kitbuqa was captured and executed. Mamluk heavy cavalrymen were clearly able to beat the Mongols in close combat, something that no one had previously done.
The Battle of Ain Jalut is notable for being the earliest known battle where explosive cannons (midfa in Arabic) were used. These explosive cannons were employed by the Mamluk Egyptians in order to frighten the Mongol horses and cavalry and cause disorder in their ranks. The explosive gunpowder compositions of these cannons were later described in Arabic military manuals from the 14th century.
On the way back to Cairo after the victory at Ain Jalut, Baibars betrayed and killed Qutuz on a hunting expedition, and became sultan himself. His successors would go on to capture the last of the Crusader states in Palestine by 1291. The Mongols were again beaten at the First Battle of Homs less than a year later, and completely expelled from Syria.
Internecine conflict prevented Hulagu Khan from being able to bring his full power against the Mamluks to avenge the pivotal defeat at Ain Jalut. Berke Khan, the Khan of the Kipchak Khanate in Russia, had converted to Islam, and watched with horror as his cousin destroyed the Abbasid Caliph, the spiritual head of Islam. Muslim historian Rashid al-Din quoted Berke as sending the following message to Mongke Khan, protesting the attack on Baghdad (not knowing Mongke had died in China): "he has sacked all the cities of the Muslims, and has brought about the death of the Caliph. With the help of God I will call him to account for so much innocent blood." . The Mamluks, learning through spies that Berke was both a Muslim and not fond of his cousin, were careful to nourish their ties to him and his Khanate.
After the Mongol succession was finally settled, with Kublai as the last Great Khan, Hulagu returned to his lands by 1262, and massed his armies to attack the Mamluks and avenge Ain Jalut. However, Berke Khan initiated a series of raids in force which lured Hulagu north away from the Holy Land to meet him. Hulagu suffered severe defeat in an attempted invasion north of the Caucasus in 1263. This was the first open war between Mongols, and signaled the end of the unified empire.
Hulagu was only able to send a small army of two tumens in his only attempt to attack the Mamluks after Ain Jalut, and it was repulsed. Hulagu Khan died in 1265 and was succeeded by his son Abaqa, thus establishing his line.
After Hulagu, later Khans would attempt again to conquer the Muslim lands, and many battles were fought. In 1303 the Mamluks fought the Mongols for a final time and defeated them at the Battle of Shaqhab. The Mamluk Sultanate would rule the Middle East for 250 years until Selim the Grim and the Ottoman Empire put an end to their independence. Berke Khan and his descendants would rule Russia for another 220 years until the Grand Duke of Moscow finally broke their hold at the Great Standing on the Ugra River in 1480. The shortest-lived of the dynasties was that of Hulagu Khan; his line ruled parts of Southwest Asia for only 91 years. The Ilkhanate established by him was overthrown in 1353.