Yarkent Khanate
In the west, Mahmud Khan ruled from Tashkent over the Yarkent Khanate. In 1488, the Timurids of Samarkand tried to recover Tashkent but were defeated by Mahmud. In 1487, Mahmud gave refuge to Muhammad Shaybani, who then seized Bukhara and Samarkand from the Timurids in 1500, making himself ruler of Transoxania. Muhammad immediately turned against Mahmud, who called his brother Ahmad Alaq for help, and defeated both the Moghul khans and took them prisoner. He released them soon after but kept Tashkent and Sairam. Ahmad died soon after. Mahmud was captured again in 1508 and put to death, marking the last time the Chagatayids were ejected from Transoxania.