Battle of Andkhud

The Battle of Andkhud, also spelt as Battle of Andkhui, alternatively known as the Catastrophe of Andkhud was fought in 1204 on the bank of river Oxus near Andkhoy in present-day Afghanistan. It was fought between the Ghurid forces of Muhammad of Ghor against the Qara Khitai forces (as aid of Khwarazmian Empire) led by Tayangu of Taraz. The battle ended in a complete rout of the Ghurids, although Muhammad of Ghor managed to escape the debacle after the intervention by Uthman of Qarakhanid.

The Ghurids, soon after the death of Tekish of Khwarezm, invaded and annexed most of the Khorasan amidst the civil war among the successors of Tekish for the throne. However, the Ghurids conquests were recaptured by Alauddin Shah who made diplomatic overtures to make peace with the Ghurids. Although, the Ghurids turned down his overtures. Ghiyath al-Din Muhammad at this point, died in Herat (1203) and was succeeded by his brother Muhammad of Ghor. Alauddin soon displaced the Ghurid governor from Herat and relieved the city which lead to a full-scale invasion from Muhammad of Ghor who besieged Alauddin's capital of Gurganz. However, the Ghurids failed to press upon the siege and were forced to retreat when a large contingent of Qara Khitai and Qarakhanid forces come in aid of the Khwarazmians.

The Ghurids were chased in their retreat and in a decisive battle fought near the river of Oxus, in Andkhud, Muhammad's forces were completely routed by Qara Khitais who further chased him in his retreat as well. Muhammad was allowed to retreat safely to Ghazna after paying heavy ransom to Tayangu.

The Catastrophe of Andkhud lead to the loss of most of the Khurasan for the Ghurids and a number of their slave generals rebelled in the core Ghurid domain as well. Muhammad of Ghor, however successfully dealt with these rebellions and made preparations to avenge his defeat but was assassinated at Damyak on 15 March 1206. His successor was forced to acknowledge the suzerainty of Khwarazmians who overthrew the Ghurids by 1215 but were themselves uprooted by Genghis khan in 1221.

Background
By close of the twelfth century, the Ghurid Empire under the dyarchy of Ghiyath al-Din Muhammad and his younger sibling Muhammad of Ghor reached its greatest territorial extent. After expelling the Ghaznawids from their last bastion in 1186, the Ghurids achieved a landscape victory in 1192, against the forces of Chahamana king Prithviraja III in Second Battle of Tarain which opened the whole of Ganga valley which Muhammad and his slave generals pressed upon in subsequent years and reached as far as the Ganges Delta in Bengal. After their conquests in the Indian subcontinent, the Ghurids embarked upon the struggle with Khwarazm Empire for the supremacy of Khorasan.

Meanwhile, Tekish died in 1200 and was succeeded by his son Alauddin Shah. Taking advantage of the civil war between Alauddin and his nephew Hindu Khan for the throne, the Ghurids successfully captured Nishapur, Merv, Tus and reached right up to Gorgan and Bisṭām. Further, in Merv, the Ghurids stationed Alauddin's rival Hindu Khan on the throne. Thus, the Ghurids for a short time captured most of the Khorasan for the first time. However, Alauddin soon ascended to the throne in August 1200 and recaptured his territories from the Ghurids after a series of incursion which began from September 1201 and recaptured Nishapur and other Ghurid conquests including Herat. Despite this success, Alauddin tried to make cordial relations with the Ghurids (possibly to get rid from Qara Khitai supremacy) and wrote a letter to them to treat him as his son and offered to marry his mother Turkan Khatun to Muhammad of Ghor. However, the overtures by Alauddin were turned down by the Ghurids and they continue to carry raids in Khorasan.

Around the same time, Ghiyath al-Din died in 1203 due to illness in Herat and Muhammad succeeded him as the sole ruler of Ghurid dynasty. Taking advantage of Muhammad absence from Herat, amidst death of his brother, Alauddin defeated the Ghurid garrison in Herat and recaptured the city. However, Muhammad drove back him from Merv and decisively defeated him east of his capital in Gurganz. Muhammad in order to give a decisive blow to the Khwarezmian, besieged their capital Gurganz, possibly to completely annex their empire. Alauddin retreated, and requested aid from the Qara Khitai rulers who were themselves in hostile relations with the Ghurids after their invasion of Balkh. Thus, Qara Khitai's sent a large contingent of 40,000 soldiers under the command of Tayangu of Talas along with Qarakhanid ruler Uthman ibn Ibrahim of Samarkand and his cousin Taj al-Din Bilge Khan.

Battle
Due to the hostile environment in Gurganz and on the encroachment of the Qara Khitai and Qarakhanid contingents, the Ghurids were forced to relieve the siege and start their retreat to Ghazna. The Qara Khitai troops albeit, stationed themselves near the river Oxus to overtake the Ghurids in their retreat.

Muhammad was chased by the forces of Alauddin until Saifabad where the Khwarezmians inflicted significant losses on the Ghurids in Hazar Saf, before the aiding contingent of Khwarezmians marching from Transoxania surrounded them. The Ghurids exhausted in their long march from Gurgānj started the battle with Muhammad in the rear of his army with 20,000 cavalry soldiers. Many of the Ghurid soldiers start retreating although, Muhammad continue to lead the vanguard. However, he got seriously wounded by an arrow and was taken by his slave general Aibak Yogi to safety inside a castle between Merv and Balkh. A large number of Ghurid soldiers were slain who covered his retreat to the castle, including the Ghurid governor of strategic Multan and Uch - Nasiruddin Aitam. According to the chronicler Hasan Nizami - "Only a few person from the army of Islam were left". The numerically superior forces of Qara Khitais and Qarakhanids eventually routed the Ghurids completely.

The victorious army advanced further and successfully breached the wall of the castle in which Muhammad of Ghor took shelter. At this time, Uthman who according to Minhaj-i Siraj Juzjani didn't want the "Sultan of Islam to be captured by the infidels", intervened and asked Muhammad of Ghor to negotiate and surrender his possessions to escape alive. Muhammad agreed for the negotiations and paid heavy ransom to Tayangu. Thus, Muhammad routed completely was allowed to return to his capital safely.

Aftermath
The defeat in Andkhud turned out to be a disaster for prestige of the Ghurids, who lost their control over most of the Khorasan except Herat and Balkh. Further, Muhammad was forced to conclude a peace treaty with Alauddin and Khwazmian Empire.

The Catastrophe of Andkhud, lead to a number of rebellions in the Ghurid empire. Aibak Beg, his general during the battle deserted him and seized Multan after executing Muhammad's governor of Multan Amirdad Hasan. Hussain Kharmil as per Juzjani, also deserted him. Notwithstanding, within a year or so, Muhammad of Ghor curbed these rebellions and restored his empire to stability. He ordered the construction of a boat bridge across the river Oxus to launch a invasion of Transoxania to avenge his rout at Andhkhud. The Ghurid governor of Bamiyan was ordered to prepare for a "holy war against the infidels of Turkistan".

However, another rebellion occurred in his empire in the Salt Range by the Hindu Khokhars who disrupted Muhammad's communication between Lahore and Ghazni which forced him to move towards India again. The Khokhars were defeated after a hotly contested battle. On his way back, Muhammad was assassinated near the Indus by Ismailis on 15 March 1206 whom he persecuted during his lifetime.

After his death, his successor Ghiyath al-Din Mahmud was forced to acknowledge the suzerainty of the Khwarezmians. The Khwarezmian empire within a decade or so, reached up to the Indus River and captured the western frontier of Ghurids as well which included Ghazni, Kandahar and Kabul. However, the Khwarezmian empire, soon was swept away by the Mongol conqueror Genghis Khan in 1221.