The Berke–Hulagu war was fought between two Mongol leaders, Berke Khan of the Golden Horde and Hulagu Khan of the Ilkhanate. It was fought mostly in the Caucasus mountains area in the 1260s after the destruction of Baghdad in 1258. The war overlaps with the Toluid Civil War in the Mongol Empire between two members of the Tolui family line, Kublai Khan and Ariq Böke, who both claimed the title of Great Khan (Khagan). Kublai allied with Hulagu, while Ariq Böke sided with Berke. Hulagu headed to Mongolia for the election of a new Khagan to succeed Möngke Khan, but the loss of the Battle of Ain Jalut to the Mamluks forced him to withdraw back to the Middle East. The Mamluk victory emboldened Berke to invade the Ilkhanate. The Berke–Hulagu war and the Toluid Civil War as well as the subsequent Kaidu–Kublai war marked a key moment in the fragmentation of the Mongol empire after the death of Möngke, the fourth Great Khan of the Mongol Empire.
In 1252, Berke converted to Islam, and in 1257 he assumed power in the Golden Horde after the death of Ulaghchi. Like his brother Batu, he was loyal to the Great Khan Möngke. Although aware of Berke's conversion to Islam, Hulagu, after conquering Persia, destroyed Baghdad in 1258, added Iraq to the Mongol Empire, advanced towards Syria and Mamluk Sultanate, and began a war of attrition against the Mamluk Sultanate. Berke became enraged with Hulagu's rampage through Muslim lands, and as a preparatory step, directed his nephew Nogai Khan to raid Poland in 1259 in order to collect booty to finance a war. Several Polish cities were plundered, including Kraków and Sandomierz. Berke then struck an alliance with the Mamluk Sultan Qutuz and later Sultan Baibars of Egypt.
That same year, Mongke died in a military campaign in China. Muslim historian Rashid al Din quoted Berke Khan as sending the following message to Mongke Khan, protesting the attack on Baghdad, (not knowing Mongke had died in China).
- "He (Hulagu) has sacked all the cities of the Muslims. With the help of God I will call him to account for so much innocent blood."
Even while Berke was Muslim he was at first desisting from the idea of fighting Hulegu out of Mongol brotherhood, he said Mongols are killed by Mongol swords. If we were united, then we would have conquered all of the world. but the economic situation of the Golden Horde due to the actions of the Ilkhanate led him to declare jihad because the Ilkhanids were hogging the wealth of North Iran and the Ilkhanate's demands for the Golden Horde to not sell slaves to the Mamluks.<ref name="Elverskog2011">Şablon:Cite book</ref>
In 1260 Hulagu's lieutenants in the Middle East lost the Battle of Ain Jalut to the Mamluks while Hulagu was in Mongolia to participate in the succession of a new Great Khan following the death of Mongke. Upon hearing the news, Hulagu began preparing to avenge the defeat. Two years later he returned to his lands in Persia, but was distracted and prevented from dealing with the Mamluks when Berke carried through on the threat to war against his cousin so as to avenge the sack of Baghdad. Berke again unleashed Nogai Khan to launch a series of raids - this time multiple reconnaissances in force in the Caucasus region - which drew Hulagu north with the bulk of his forces. Berke also dispatched Negudar to eastern Afghanistan and Ghazni, recovering lands under Il Khanate control.<ref>Early Mongol Rule in Thirteenth-Century Iran: A Persian Renaissance By George Lane, pg. 77</ref>
Hulagu was loyal to his brother Kublai, but clashes with their cousin Berke, the ruler of the Golden Horde in the northwestern part of the Empire, began in 1262. The suspicious deaths of Jochid princes in Hulagu's service, unequal distribution of war booties and Hulagu's massacres of the Muslims increased the anger of Berke, who considered supporting a rebellion of the Georgian Kingdom against Hulagu's rule in 1259-1260.<ref>L.N.Gumilev, A.Kruchki - Black legend</ref> Berke also forged an alliance with the Egyptian Mamluks against Hulagu, and supported Kublai's rival claimant, Ariqboke. Kublai dispatched an army under Abaqa to attack the Golden Horde, while Ariqboke sent Nogai to invade the Ilkhanate; both sides suffered disastrous defeats.<ref>Barthold, Turkestan down to the Mongol invasion, p. 446</ref>
Arikboqe surrendered to Kublai at Shangdu on August 21, 1264, after which the rulers of the Golden Horde and Chagatai Khanate acknowledged the reality of Kublai's victory and rule,<ref>Weatherford, Genghis Khan and the making of the modern world, p. 120</ref> after which Kublai began preparations for his conquest of the Song Dynasty.<ref name=autogenerated3>Atwood</ref>
When the Byzantine Empire, the ally of the Ilkhanate, captured Egyptian envoys, Berke sent an army through his vassal Bulgaria, prompting the release of the envoys and the Seljuq Sultan Kaykaus II. He tried to raise civil unrest in Anatolia using Kaykawus but failed. In the new official version of the family history, Kublai Khan refused to write Berke's name as the khan of Golden Horde for his support to Arikboke and wars with Hulagu, however, Jochi's family was fully recognized as legitimate family members.<ref>H.H.Howorth - History of the Mongols, section: Berke khan</ref>
Kublai Khan also reinforced Hulagu with 30,000 young Mongols in order to stabilize the political crises in western khanates.<ref>Rashid al-Din, Ibid</ref> As soon as Hulagu died on the 8th of February, 1264, Berke marched to cross near Tiflis, but he died on the way. Within a few months of these deaths, Alghu Khan of the Chagatai Khanate died too. Nevertheless, this sudden vacuum of power relieved Kublai's control over the western khanates somehow.
This was the second open war between Mongols, shortly after the beginning of the Toluid Civil War between Kublai Khan and Ariq Böke. Before that there had been tensions between Batu and Güyük that could have erupted into an open war, but the premature death of the latter averted hostilities. Together with the war between Kublai Khan and Ariq Böke, Berke and Hulagu set the precedents that was repeated in the form of further wars between Mongol khanates, such as the conflicts between Abaqa and Barak in 1270, Kaidu and Kublai Khan in the 1270s and 1280s, Toqta and Nogai in the late 1290s, and the war between Duwa and Chapar in the early 14th century. This war, along with the second raid against Poland, also marked the rise of Nogai Khan in the Golden Horde. After Berke's death he became ever more powerful, and became a kingmaker in the Golden Horde.