Battle of Qatwan

The Battle of Qatwan was fought in September 1141 between the Kara-Khitan Khanate and the Seljuq Empire and its vassal-state the Kara-Khanids. The Seljuqs were decisively defeated, which signalled the beginning of the end of the Great Seljuk Empire.

Background
The Khitans were a Mongolian people of the Liao Dynasty who moved west from Northern China when the Jurchens invaded and destroyed the Liao Dynasty in 1125. They were led by Yelü Dashi who took the Eastern Karakhanid capital of Balasaghun. In 1137, they defeated the Western Karakhanids, a vassal of the Seljuks, at Khujand, and the Karakhanid ruler Mahmud II appealed to his Seljuk overlord Ahmed Sanjar for protection. In 1141, Sanjar with his army arrived in Samarkand. The Kara-Khitans, who were invited by the Khwarazmians (then also a vassal of the Seljuks) to conquer the lands of the Seljuks, and also responding to an appeal to intervene by the Karluks who were involved in a conflict with the Karakhanids and Seljuks, also arrived.

Battle
Widely varying figures from different sources were given for the Kara-Khitan forces, ranging from 25,000 to 700,000, while the Seljuk forces ranged from 70,000 to 100,000. The Kara-Khitans were also said to have been given a reinforcement of 30,000-50,000 Karluk horsemen.

On the Qatwan steppe, north of Samarkand, the battle was joined. The Khitan divided their armies into three contingents, with the smaller left and right flanks each held 2,500 men. The Kara-Khitans attacked the Seljuks forces simultaneously, encircled them, and forced the Seljuq center into a wadi called Dargham, about 12 km from Samarkand. Faced with no way out, the Seljuq army was destroyed and Sanjar barely escaped. Figures of the dead ranged from 11,000 to 100,000. Among those captured at the battle were Seljuq military commanders and Sanjar's wife.

Aftermath
Yelü Dashi spent ninety days in Samarkand, accepting the loyalty of Muslim nobles and appointing Mahmud's brother Ibrahim as the new ruler of Samarkand. However, Yelü did allow the Muslim Burhan family to continue to rule Bukhara. After this battle, Khwarazm became a vassal state of the Kara-Khitan. In 1142, Yelü sent Erbuz to Khwarazm to pillage the province, which forced Atsiz to agree to pay 30,000 dinars annual tribute.

Legend
Stories of this battle, told during the Second Crusade, filtered back to the Holy Land, inspiring stories of Prester John.