In 1598, Abdullah Khan II from the Shaybanid dynasty, who had rule the Khanate of Bukhara since 1583, died.
[3] This appointment was contested by several other rulers, like Tauekel Khan of the Kazakhs, Kasim Sultan and Baqi Muhammad, whose mother was Abdullah Khan's sister and whose father a prince from Astrakhan named Jani Muhammed Beg.
He was the son of Prince Yar Muhammed, who was a member of the Tuqay-Timurid who had ruled the Astrakhan Khanate, until they were chased by the Russians in 1555.
In 1740, Bukhara was conquered by Persia, but Abu al-Fayz Khan remained on the throne.
The real power was in the hands of Ataliq Muhammad Rahim, who even had the Khan killed in 1747.