The Khanate of Bukhara (or Khanate of Bukhoro) (; ) was an Uzbek state in Central Asia from 1500 to 1785, founded by the Abu'l-Khayrid dynasty, a branch of the Shaybanids. From 1533 to 1540, Bukhara briefly became its capital during the reign of Ubaydallah Khan. The khanate reached its greatest extent and influence under its penultimate Abu'l-Khayrid ruler, the scholarly Abdullah Khan II (r. 1557–1598). In the 17th and 18th centuries, the Khanate was ruled by the Janid Dynasty (Astrakhanids or Toqay Timurids). They were the last Genghisid descendants to rule Bukhara. In 1740, it was conquered by Nader Shah, the Shah of Iran. After his death in 1747, the khanate was controlled by the non-Genghisid descendants of the Uzbek emir Khudayar Bi, through the prime ministerial position of ataliq. In 1785, his descendant, Shah Murad, formalized the family's dynastic rule (Manghit dynasty), and the khanate became the Emirate of Bukhara. The Manghits were non-Genghisid and took the Islamic title of Emir instead of Khan since their legitimacy was not based on descent from Genghis Khan. Abu'l-Khayrid dynasty Rise of Muhammad Shibani The first dynasty to rule the khanate was the Abu'l-Khayrid dynasty, which reigned from 1500 until 1598. They were a branch of the Shibanids and claimed descent from Genghis Khan through his son Jochi. The ancestor of the ruling Abu'l-Khayrids, Abu'l Khayr Khan, established an empire that by the time of his death in 1469 stretched from Siberia to the Syr Darya river. He controlled the cities of Sighnaq, Suzaq, Arquq, Uzgend, and Yassi along the Syr Darya. However, the Uzbek tribes remained nomadic, living a life on the steppe, and Abu'l Khayr Khan had no interest in conquering the lands of Transoxiana or Khorasan. Following his death, his empire broke up into smaller pieces led by sultans and tribal chieftains. One of these units was led by Muhammad Shibani, Abu'l Khayr's grandson. He was well-educated, had great military intellect, and desired to conquered the sedentary lands of Mawarannahr for himself. In the 1490s Muhammad Shibani swept through Central Asia and conquered Samarqand, Bukhara, Tashkent, and Andijan from 1500 to 1503. One of his most ferocious enemies was Zahir ud-Din Muhammad Babur, the Timurid prince of Ferghana. He managed to briefly occupy Samarqand from Muhammad Shibani, and attempted on two other occasions to take it. A turning point in the conflict between the two was the Battle