of Sar-i Pul in the spring of 1501, which resulted in Babur's defeat. In 1505 Muhammad Shibani took Urgench after a 10-month siege, resulting in the annexation of Khwarazm. The ruler of Herat, Sultan Husayn Bayqara, attempted to launch a campaign to Transoxiana but it proved to be abortive. When he decided to take the field, he was no longer capable of leading the army. In 1506 he died, being succeeded by his two sons (Badi' al-Zaman Mirza and Muzaffar Husayn Mirza). Despite their differences, they agreed to jointly field an army against the Uzbeks. They assembled their forces along the Murghab River, allying with Babur to crush Muhammad Shibani. In 1506 Shibani captured Balkh, and the allied Timurid force disintegrated on its own. Finally in 1507 he was able to take Herat and the rest of the Timurid lands. By this time he ousted the Timurids from Qunduz, Balkh, Khorasan, Khwarazm, and other regions and incorporated them into his empire. However Shah Isma'il I of the newly founded Safavid Empire, wishing to conquer the Timurid lands for himself and enraged by Shibani's staunch Sunnism, invaded Khorasan and killed Mohammad Shibani outside the city of Merv in 1510. Khorasan and Khwarazm were conquered by Iran and Samarqand was briefly lost to Babur in 1512. However, he was unable to establish his presence there for long and soon the Uzbeks were able to reclaim their lost territory. However, Khwarazm permanently became independent, becoming the Khanate of Khiva. It was ruled by the Arabshahids, another branch of the Shibanids. Khwarazm was briefly conquered by Ubaydullah Khan (1533-1539) but shortly after it became independent once again. Janid Dynasty The Janid Dynasty (descendants of Astrakhanids) ruled the Khanate from 1599 until 1747. Yar Muhammad and his family had escaped from Astrakhan after Astrakhan fell to Russians. He had a son named Jani Muhammad who had two sons named Baqi Muhammad and Vali Muhammad Khan from his wife, who was the daughter of the last Shaybanid ruler. The son of Din Muhammad Sultan - Baqi Muhammad Khan in 1599 defeated Pir Muhammad Khan II, who had lost his authority. He became the real founder of a new dynasty of Janids or Ashtarkhanids in the Bukhara Khanate (1599–1756). Boqi Muhammad Khan, despite his short reign, carried out administrative, tax and military reforms in the country, which contributed to its further development. He issued coins with the