 In 992, the Karakhanids under Bughra Khan invaded the domains of amir Nuh II, and briefly wrested Bukhara from Samanid control.However, during his stay in Bukhara, Bughra Khan fell sick, and in order to ensure that the city remained under Karakhanid control, he installed Nuh's uncle Abd al-Aziz as the Samanid ruler, effectively as a Karakhanid puppet.Bughra Khan then left Bukhara for Samarkand, but died before he reached the city.