Mongol invasions of the Levant

Starting in the 1240s, the Mongols made repeated invasions of Syria or attempts thereof. Most failed, but they did have some success in 1260 and 1300, capturing Aleppo and Damascus and destroying the Ayyubid dynasty. The Mongols were forced to retreat within months each time by other forces in the area, primarily the Egyptian Mamluks. The post-1260 conflict has been described as the Mamluk–Ilkhanid War.

First invasion
During the governorship of Bachu in Persia, the Mongolian army under Yisaur attacked Syria in 1244. The reasons for the attack are unclear, but it may have been in retaliation for the Syrian participation on the Seljuk side in the Battle of Köse Dağ. In the autumn 1244, Yisaur concentrated the Mongol forces in the upper Tigris valley where they subjugated the Kurdish province of Akhlat. Moving across, the Mongolian army encountered no resistance and ravaged the area en route. The fortified cities were untaken in his advance because Yisaur was not prepared for siege assault. Passing through the territory of the city of Urfa, he crossed the Euphrates.

He marched directly to Aleppo but went as far as Hailan before the climate impaired his army's movements. Yisaur sent envoys to Aleppo to demand submission of tribute, which Malik agreed to pay. The same demand were sent to Bohemond V of Antioch who chose not to fight them instead of defiance.

Yisaur withdrew his force back up the Euphrates valley and received the submission of Malatya. In Egypt, Sultan as-Salih Ayyub decided to acquiesce to the results and made no attempt to raise an army to encounter the Mongols who had invaded his dominions in Syria.

In 1251, as an expediency to buy peace, Sultan an-Nasir Yusuf sent his representatives to Mongolia for the election of Möngke and agreed to make Syria a vassal state of the Mongol Empire.

1260 invasion
In 1255, Hulagu sought to further expand the Empire into the Middle East under orders from his older brother, the Great Khan Möngke. Hulagu's forces subjugated multiple peoples along the way, most notably the center of the Islamic Empire, Baghdad, which was completely sacked in 1258, destroying the Abbasid Caliphate. From there, the Mongol forces proceeded into Syria.

In 1260, Egypt was under the control of the Bahri Mamluks, while most of the Levant (aside from the Crusader states) was still under the control of Ayyubid princes. The Mongols, for their part, had combined their forces with that of their Christian vassals in the region, the Georgians; the army of Cilician Armenia under Hethum I, King of Armenia; and the Franks of Bohemond VI of Antioch. In what is described by the 20th-century historians René Grousset and Lev Gumilev as the "yellow crusade" (Croisade Jaune), the combined forces captured the city of Aleppo in January, and then on March 1, 1260, under the Mongol Christian general Kitbuqa, took Damascus. The last Ayyubid king, An-Nasir Yusuf, was captured by the Mongols near Gaza in 1260. However, Hulagu promised him that he would appoint An-Nasir Yusuf as his viceroy in Syria. With the Islamic power center of Baghdad and Syria gone, the center of Islamic power transferred to the Mamluks in Cairo.

Hulagu's intention at that point was to continue south through Palestine to Egypt, to engage the Mamluks. However, Möngke died in late 1259, requiring Hulagu to return to Karakorum to engage in the councils on who the next Great Khan would be. Hulagu departed with the bulk of his forces, leaving only about 10,000 Mongol horsemen in Syria under Kitbuqa. Some of Kitbuqa's forces engaged in raids southwards towards Egypt, reaching as far as Gaza, where a Mongol garrison was established with 1,000 troops.

The Mamluks took advantage of the weakened state of the Mongol forces, and, negotiating a passive alliance with the remnants of the Crusader forces in Acre, advanced northwards to engage the Mongols at the pivotal Battle of Ain Jalut in September 1260. The Mamluks achieved a decisive victory, Kitbuqa was executed, and the battle established a high-water mark for the Mongol conquests. In previous defeats, the Mongols had always returned later to re-take the territory, but they were never able to avenge the loss at Ayn Jalut. The border of the Mongol Ilkhanate remained at the Tigris River for the duration of Hulagu's dynasty. Sultan An-Nasir and his brother were executed after Hulagu heard the news of the defeat of Kitbuqa at Ain Jalut.

In December 1260, Hulagu sent 6,000 troops back into Syria, but they were defeated at the First Battle of Homs.

Caliphate of Cairo and the rebellion in Mosul
After the fall of Baghdad in 1258, a few of Abbasid princes fled to Syria and Egypt. There, the Abbasids still maintained a feeble show of authority, confined to religious matters, under the Mamluks. But their authority was limited to being figureheads. First of the Caliphs in Cairo, Al-Mustansir II was dispatched to Mesopotamia by Baybars. The Caliph was reinforced with Syrian auxiliaries and the Bedouins. However, he was totally crushed by the Mongol vanguard in South Iraq in 1262. The Mongol protectorate and ruler of Mosul, Badr al-Din's sons sided with the Mamluks and rebelled against the rule of Hulagu. This led to the destruction of the city state and the Mongols finally suppressed the rebellion in 1265.

1271 invasion
The second Mongol invasion of Syria took place in October 1271, when 10,000 Mongols led by general Samagar and Seljuk auxiliaries moved southwards from Rûm and captured Aleppo; however they retreated back beyond the Euphrates when the Mamluk leader Baibars marched on them from Egypt.

Area alliances
In the second half of the 13th century, civil war had erupted in the Mongol Empire. In the Middle East, this manifested as conflict between the Mongols of the Golden Horde, and the Mongols of the Ilkhanate, who battled over claims on Georgia and Azerbaijan. Both the Golden Horde and the Ilkhanate sought to strengthen their position via trade agreements or other types of alliances with other powers in the area. In 1261, Berke of the Golden Horde allied with the Mamluk Sultan Baibars,    against their common enemy the Ilkhanate. This alliance was both strategic, and also in terms of trade exchanges, as the Egyptians had been the Golden Horde's long-standing trade partner and ally in the Mediterranean.

For their part, the Mongols of the Ilkhanate sought (unsuccessfully) an alliance with the Franks of Europe, but did form a Byzantine-Mongol alliance with the Christian Byzantine Empire.

Conflict between the Golden Horde and the Il-Khans
The two Western Mongol realms, the Golden Horde and the Il-Khanate, were already in open war. The roots of the conflict were related to battles between the descendants of Genghis Khan over the control of the Empire. The immediate successor to Genghis Khan was his son Ögedei, but the leadership was then taken by force by the descendants of Genghis' son Tolui. During the reign of Kublai Khan (son of Genghis' son Tolui), descendants of Genghis's other sons Ögedei, Chagatai, and Jochi sought to oppose the rule of Kublai. The Ilkhanate had been founded by Hulagu, another of Tolui's sons, who was therefore loyal to Kublai. The Golden Horde had been founded by Genghis' son Jochi, following the Mongol invasion of Central Asia. Genghis had designated several of the territories south of the Caucasus to Jochi, specifically Georgia, and the Seljukid Sultanate. Hulagu, with the backing of his brother the Great Khan Kublai, invaded and captured these territories in 1256, even installing his capital in the center of the disputed territories, at Maragha. Berke, the leader of the Golden Horde, could not tolerate this infringement of his inheritance, and a drawn-out conflict between the two Mongol realms continued well into the 14th century.

Ethnic and religious affinities
Various affinities led to a more or less natural alliance between the Mongols of the Golden Horde and the Mamluks of Egypt. The Mamluks' Empire had been founded by former slaves bought from the Kipchak territory of southern Russia, which was now an important segment of the Mongol Golden Horde. There were therefore already cultural affinities between large segments of the Mongol Horde and the ruling elite of Egypt. Berke's Turkic subjects also spoke the same Turkic language as the Mamluks. Further, the Golden Horde, under Berke's leadership, was the first of the Mongol states to convert to Islam, which lent to solidarity with the Islamic realms to the south. On the other hand, the Il-Khan rulers were highly favourable to Christianity, and did not commit to Islam until 1295, when the Ilkhan Ghazan, a descendant of Tolui, formerly converted when he took the throne. Even after his conversion though, he continued to battle the Mamluks for control of Syria, while simultaneously seeking an alliance with Christian Europe.

Mamluk-Golden Horde rapprochement
The Golden Horde entered into a defensive alliance with the Mamluks in Egypt, with the agreement being that each realm would intervene if the other was attacked by the Ilkhanate. This required the Il-khan to devote forces to both his northern and southern borders, and never use all forces in a single battle. On multiple occasions, the forces of the Ilkhanate would start a campaign towards Syria in the south, only to be forced to recall troops within a few months because of attacks from the Golden Horde in the north.

1280–81 invasion
The third major invasion took place in 1280–81 under Abaqa Khan. Having crossed the Euphrates and captured Aleppo in 1280, the Mongols of the Ilkhanate moved as far south as Homs with 40,000 men before they were beaten back to the Euphrates river at the Second Battle of Homs in October 1281.

The Il-khan Tekuder ((r. 1282 – 1284)) was friendly to Islam, and sent a letter to the Mamluk sultan to broach the subject of peace, but Tekuder's envoy was arrested by the Mamluks. Tekuder's conversion to Islam and attempts to make peace with the Mamluks were not popular with the other nobles of the Ilkhanate. When Tekuder's brother Arghun challenged him for the throne, Tekuder sought assistance in vain from the Mamluks, but was executed. Arghun ((r. 1284 – 1291)) took power, and as directed by the Great Khan Kublai ((r. 1260 – 1294)) continued Mongol attempts to conquer Syria.

The Mamluk–Ilkhanid War: 1299–1303
In late 1299, the Mongol Ilkhan Mahmud Ghazan, son of Arghun, took his army and crossed the Euphrates river to again invade Syria. They continued south until they were slightly north of Homs, and successfully took Aleppo. There, Ghazan was joined by forces from his vassal state of Cilician Armenia.

The Mamluk relief force sent from Damascus met the Mongol army northeast of Homs, at the Battle of Wadi al-Khazandar (sometimes called the Battle of Homs) in December 1299. The Mongols had some 60,000 troops, with about 40,000 Georgian and Armenian auxiliaries, and routed the Egyptian Mamluks with their much smaller force of 20,000–30,000 troops. The Mamluks retreated, and were harassed by Maronite and Druze bowmen who wanted independence from the Mamluks. One group of Mongols also split off from Ghazan's army, and pursued the retreating Mamluk troops as far as Gaza, pushing them back to Egypt. The bulk of Ghazan's forces then proceeded onward towards Damascus. Some of the populace of Damascus upon hearing of the Mongol approach had fled to Egypt, and the governor of the city, Arjawash, had entrenched himself deep inside the Citadel of Damascus. The Mongols besieged the city for ten days, which surrendered between December 30, 1299, and January 6, 1300, though its Citadel resisted. Ghazan then withdrew most of his forces in February, promising to return in the winter of 1300–1301 to attack Egypt. The reason for the withdrawal is believed to be either the Chagatai Mongols invading their eastern borders, or the need to retreat to areas where there was better grazing room for the horses. The Mamluks had learned that the availability of pastures was important to the Mongols, and so had taken to burning pastureland so as to prevent the rapid advance of the Mongol cavalry. After Ghazan's main force withdrew, only about 10,000 horsemen remained in Syria, under the Mongol general Mulay.

With the retreat of the majority of forces from both sides, for about three months, until the Mamluks returned in May 1300, Mulay's forces were in technical control over Syria, and some Mongols engaged in raids as far south as Jerusalem and Gaza. However, when the Mamluks returned from Egypt, the remaining Mongols retreated with little resistance.

Also in early 1300, two Frankish rulers, Guy d'Ibelin and Jean II de Giblet, had moved in with their troops from Cyprus in response to Ghazan's earlier call. They had established a base in the castle of Nephin in the lordship of Gibelet (Byblos) on the Syrian coast with the intention of joining him, but Ghazan was already gone. They also started to besiege the new city of Tripoli, but in vain, and then returned to Cyprus.

In late 1300, Ghazan's forces had dealt with the distraction of the Chagatai invasion on their northern border, and once again turned their attention to Syria. They crossed the Euphrates river between December 14, 1300 and November 1, 1301. Again, the Mamluk army in Syria withdrew without engaging in combat, which resulted in a panic in Damascus when they heard of the new threat from the Mongols. The Syrians of Hamat were able to achieve a small victory against the Mongols at a battle near Aleppo by the post of Hamat. This created order in Damascus, enough for the governor to send for a larger relief force from Egypt. However, the Mongols had already left Syria due to a death in Ghazan Khan's family.

The Ilkhanate returned to Syria in 1303, travelling unopposed down the Levant until they reached Damascus. However, near Damascus they were once again soundly defeated by the Mamluks at the Battle of Marj al-Saffar in April 1303.

Final Stage: 1312
In 1312, the new khan of the Ilkhanate, Öljaitü, pursued an aggressive policy to consolidate his rule, subduing the Caspian Province of Gilan and destroying the autonomous principality of Herat. Encouraged by the defection of some Syrian emirs, Öljaitü decided to cross the Euphrates in 1312 to attack the Mamluk Sultanate. He laid siege to the heavily fortified town of Rahbat. After about a month of fighting in which they suffered heavy casualties, the Mongols ultimately failed to take the fortified place and withdrew. This was to be the last major Mongol incursion into the Levant.

Treaty of Aleppo
Following the defeat of the Mongol ruler Ghazan and the progressive conversion of the Il-Khanate to Islam, the Mongols finally were amenable to ceasing hostilities. The first contacts to establish a treaty of peace were communicated via the slave trader al-Majd al-Sallami. After the initial communications, more formal letters and embassies were exchanged. Under the Ilkhanate ruler Abu Sa'id, who was following the advice of his custodian Chupan, the treaty with the Mamluks was ratified in 1322/1323. Indeed, the Mongols never made peace with the Muslims until they themselves became Muslims. This situation was analogous to the pagan Viking conquest of Normandy and England, where Viking Scandinavians never truly made peace with the Christian kingdoms until they themselves became Christian.

Following the treaty and a period of peace, the Il-Khanate further disintegrated, and effectively disappeared during the 14th century.

Aftermath and effects
The Mongol invasions caused significant upheaval and demographic change in Iraq and the Levant. When the Mongols reached Iraq and Jazira in 1258, there was probably significant movement westward into Mamluk dominions. According to Bar Hebraeus, the entire population of the northernmost regions of al-Sham (Syria) fled to Aleppo in 1259. One pro-Mongol historian, Rashīd al-Dīn, wrote that the entire population of some provinces was either killed or fled. The cities of Harran, al-Ruha, Saruj and Raqqa were completely uncultivated and abandoned. Aleppine historian Ibn Shaddad confirms this, providing additional details for the aftermath of the battle of Ain Jalut. Much of al-Ruha (present-day Urfa), Saruj, Harran and Qal'at Najm were captured and destroyed, and their inhabitants fled. The fortress town of Qal'at Ja'bar surrendered, but the Mongols also destroyed it alongside the surrounding countryside. Much of these cities and towns were subsequently depopulated and abandoned for centuries. Following the destruction, part of the population emigrated into Syria proper.