Early in 1262, Berke dispatched Nogai with 30,000 men as his vanguard while he followed with the main army, advancing pass Derbent they encamped outside Shirvan. Hulegu sent word to his dispersed forces across Iran to proceed and, set out with his main force in August. In mid-October Berke’s troops defeated Hulegu’s vanguard commanded by Shirämün Noyan near Shamakhi, on November 15 Abatai Noyan arrived, attacked and defeated Berke’s army around Shabaran killing many of them, Nogai fled. Pressing the advance, Hulegu and his men continued to pursue Berke and Nogai, and on Friday December 7, arrived at Derbent where some of the enemy troops appeared on the walls but were driven away by arrows and Derbent was taken. On the other side a battle took place which ended in a heavy defeat for Berke, who with his army unable to hold the onslaught took flight, the slaughter continued until the end of Saturday. A week later on December 15, Nogai perhaps attempting to slow down Hulegu, yet again suffered a crushing defeat and continued to flee. The victorious Ilkhanate forces continued to pursue the enemy and crossed the Terek River, capturing their tints. When Berke and his soldiers learned of this they turned back and attacked the disorganized Ilkhanate army, on January 13 1263 a fierce battle raged on the banks of the Terek River from dawn until nightfall, Berke’s reinforcements kept pouring in and the Ilkhanate army turned in flight, while crossing the frozen river the ice cracked under their weight and many soldiers drowned, Berke and his army withdrew to Derbent. Hulegu 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 Hulegu's service, unequal distribution of war booties and Hulegu's massacres of the Muslims increased the anger of Berke, who considered supporting a rebellion of the
Georgian Kingdom against Hulegu's rule in 1259–1260. Berke also forged an alliance with the Egyptian Mamluks against Hulegu, and supported Kublai's rival claimant, Ariq Böke. Kublai dispatched an army under
Abaqa to attack the Golden Horde, while Ariq Böke sent
Nogai to invade the Ilkhanate; both sides suffered disastrous defeats. Hulegu marched northwards through the Pass of Derbent against Berke. On the banks of the
Terek, he was ambushed by an army of the Golden Horde under Nogai, and his army was defeated at the Battle of the Terek River in 1262, with many thousands being cut down or drowning when the ice of the river gave way. Hulegu subsequently retreated back into
Azerbaijan. Ariq Böke surrendered to Kublai at
Shangdu on August 21, 1264. The rulers of the Golden Horde and
Chagatai Khanate subsequently acknowledged the reality of Kublai's victory and rule, after which Kublai began preparations for his conquest of the
Song dynasty. 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 Kaykaus 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 Ariq Böke and wars with Hulegu. However, Jochi's descendants were fully recognized as legitimate family members. Kublai Khan also reinforced Hulegu with 30,000 young Mongols in order to stabilize the political situation in the western khanates. As soon as Hulegu died on February 8, 1265, Berke marched to cross the Terek near
Tiflis, but died on the way. Within a few months of these deaths,
Alghu Khan of the Chagatai Khanate died, too. This sudden vacuum of power somewhat relieved Kublai's control over the western khanates. ==Aftermath==