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.
His decision to live in the city upset the Moghuls, and many of them left Moghulistan under Yunus' son Ahmad Alaq.
He was succeeded in Tashkent by his eldest son, Sultan Mahmud Khan, while the Moghuls in the east (Uyghurstan) followed Ahmad Alaq.
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.
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.
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.
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.
Muhammad Shaybani Khan treated the prisoners well and freed them after they surrendered Khwaja Abul Makaram, Tashkent, and Shahrukhiya to him.