Battle of Akhsi

In the early 16th century, Sultan Mahmud Khan, the Chagatai Khan of Western Moghulistan, and Sultan Ahmad Alaq Khan, the Chagatai Khan of Eastern Moghulistan, decided to counter the growing power of the Uzbeks under Muhammad Shaybani. Sultan Ahmed Tambol had rebelled against his Timurid master Babur and declared his independence. But when Babur tried to reconquer his territory with the help of his uncles (the above named Khans), Ahmed Tambol sought the assistance of the Uzbeks. The two Moghul brothers united their forces and launched a campaign against Tambol, but Muhammad Shaybani surprised the Khans and proved victorious in battle of Akhsi and took them both prisoner.

Background
Sultan Yunus Khan, the Chagatai Moghul Khan of Moghulistan, actively involved himself in the affairs of the Timurids in his western frontier. He made most prominent of Timurid sultans his sons-in-law, having married off his daughters to Sultan Ahmed Mirza (Mihr Nigar Khanum), Umar Shaikh Mirza II in 1475 (Qutlugh Nigar Khanum, their son was Babur, founder of the Great Moghul Empire in India) and Sultan Mahmud Mirza (Sultan Nigar Khanum, their son was Shaikh Vais Mirza better known as Mirza Khan, King of Badakhshan), and kept on friendly terms with Umar Shaikh, who frequently relied on him for assistance against Sultan Ahmad and gave him territory to reside in during the winters. In 1484 Yunus Khan took advantage of the conflict between Sultan Ahmad and Umar Shaikh and took Tashkent. His decision to live in the city upset the Moghuls, and many of them left Moghulistan under Yunus' son Ahmad Alaq. Yunus Khan died in Tashkent in 1486 after a long illness. He was succeeded in Tashkent by his eldest son, Sultan Mahmud Khan, while the Moghuls in the east (Uyghurstan) followed Ahmad Alaq.

Sultan Mahmud Khan had to defend Tashkent from the Timurids of Samarkand and of Ferghana, who resented the loss of the city to his father Yunus Khan. Mahmud Khan successfully thwarted their efforts to take Taskhent, and during his fight with Sultan Ahmad gained the defection of one of the men fighting under him, the Uzbek Muhammad Shaybani. As a reward to Muhammad Shaybani, Mahmud Khan gave him Turkistan in 1488. This was a political mistake as it resulted in him losing a long time ally in the Kazakhs who were traditional enemies of the Uzbeks. As a result, the Moghuls and the Kazakhs went to war, the result of which was the defeat of Mahmud Khan. This weakened his military prestige in the region.

In 1501 C.E., Zahir-ud-din Muhammad Babur had lost Andijan and Ferghana to his rebel minister Sultan Ahmed Tambol, who had Jahangir Mirza II and Nasir Mirza (Babur's brothers) as hostages. He also lost Samarkand to Muhammad Shaybani Khan of the Khanate of Bukhara, leaving him without a kingdom or a home. He took his family to Tashkent under the protection of his maternal uncle, Sultan Mahmud Khan, the Chagatai Khan of Western Moghulistan. There he served as an officer in the army of the Khan but did not hold authority over any territory. Seeing the rising tide of the Uzbeks under Muhammad Shaybani, Sultan Mahmud Khan consulted with his brother Ahmad Alaq in Uyghurstan and the two decided to join forces to stem the growth of the Uzbek power in the west from reaching their borders by invading Central Asia. Babur himself wanted to take active part in the operations for a chance to regain his lost territories.

Battle of Akhsi/Archiyan
Sultan Mahmud Khan, leaving his son Sultan Muhammad in Tashkent with a strong army, left for Andijan. He also left Mirza Muhammad Hussain Dughlat at Uratippa. In this way he left two major armies behind to protect his rear from being attacked by the Uzbeks while the Moghuls conducted operations in Andijan against Sultan Ahmed Tambol. He believed that Muhammad Shaybani Khan would not make the mistake of crossing between these two armies. So he took with him the remainder of his army of 15,000 men along with Babur into the former Timurid territory.

But as soon as Muhammad Shaybani Khan received intelligence of the movements of the Moghuls he hastened with an army of 30,000 men from Samarkand to Ferghana, passing by Uratippa on his road. Mirza Muhammad Hussain Dughlat was under the impression that he was about to be besieged by the Uzbeks so he prepared the fort. But Muhammad Shaybani came in the afternoon and encamped close to the town and at sunset he broke up his camp and marched away with all possible speed, so that before the men in the fort had begun to inquire in which direction he had gone, he was many miles away. When it was discovered that he had marched towards Ferghana, several messengers in succession were dispatched, to give notice to the Khans of his approach. The messengers and the enemy arrived at the same moment. Neither the army of Tashkent, nor that of Uratippa, had time to come to the aid of the Khans.

The Khans had not yet reached Andijan. Akhsi or Archiyan (possibly a town a few miles away from Namangan), which was one of the strongest forts in that country, was occupied by Shaikh Bayazid, brother of Tambol; he was treating about submission, and for that reason the Khans had tarried near the fort. At this juncture, Muhammad Shaybani Khan came up with 30,000 men. The Khans had hardly enough time to draw up in line, when, after a short conflict, the Khans were put to rout by the overpowering numbers of the enemy. Their horses being rendered useless with fatigue, the two Khans were taken prisoner. As for Babur, he fled to the hills to the south of Ferghana.

Aftermath
Muhammad Shaybani Khan treated the prisoners well and freed them after they surrendered Khwaja Abul Makaram, Tashkent, and Shahrukhiya to him. He also concluded several marriage alliances with his family and the Khans' families. He also incorporated almost 30,000 Moghuls into his army. Moghulistan was weakened as a result of this defeat. On the return of the Khans to their old residence, the younger Khan, Ahmad Alaq fell ill and died shortly afterwards. He was succeeded in Uyghurstan by his eldest son Sultan Mansur Khan. As for the elder Khan, Sultan Mahmud Khan resigned to his brother's children all the country and people that had belonged to their father, while he himself withdrew, with those few of his own people who yet remained, to the deserts of Moghulistan. There he spent five years, during which time nothing of importance happened to him until 1508 when he decided to meet Muhammad Shaybani to seek favors. When he reached Ferghana, Muhammad Shaybani received intelligence of this, he immediately dispatched men to seek the Khan out. These men were coming in exactly the opposite direction to the Khan, whom they met and slew, together with his five young sons, at Khojand.