Abu al-Fayz surrendered the khanate to
Nader Shah in 1740 in response to
Nader Shah's broader conquest of central Asia. Some accounts say that Abu al-Fayz surrendered without a fight, others say that he was defeated in battle. The two rulers reached an agreement in which Abu al-Fayz was confirmed as king of
Turkestan, Nader Shah married Abu al-Fayz's daughter, and Muhammad Hakim Khan, a quasi-independent governor of
Qarshi, was appointed as the
ataliq. By the time Nader Shah defeated Abu al-Fayz, the khanate of Bukhara existed only in name.
Samarkand, Hisar, and
Shahrisabz had had de facto independence for decades prior. Nader Shah did not help the economic status of Bukhara and instead exhausted Bukhara's resources for his own war campaigns. Abu al-Fayz saw this as an opportunity to remove his own political competition, and suggested that Nader Shah conscript tribal leaders that were politically troublesome for Abu al-Fayz. ==Execution by Muhammad Rahim Bey==