 But history dealt its blows, ending Avicenna’s idyllic existence of secure employment, intellectual renown, and the admiration of his compatriots. In 999 the Turkic Qarakhanids effectively put an end to the Samanids and took over Bukhara. Avicenna, manifestly because of his close affiliation with the ruling dynasty and his high position in the Samanid administration, saw fit to flee Bukhara. In the Autobiography he provides no political context for his decision but merely says, “necessity led me to forsake Bukhara” (Gohlman 1974, 40–41), though the nature of this “necessity” could hardly be mistaken by his contemporaries and even by us. Thus began Avicenna’s lifelong itinerant career and the attendant quest for patronage and employment (Reisman 2013). Initially he moved north to Gurganj in Khwarizm (999?–1012), but eventually he had to leave again and traveled westwards, staying for a while (1012–1014?) first in Jurjan, off the southeastern Caspian, and then going on into the Iranian heartland, in Ray (1014?–1015), in Hamadhan (1015–1024?), and finally in Isfahan (1024?–1037), in the court of ʿAlāʾ-ad-Dawla, the Kakuyid ruler of the area (Gutas 2014b-I, 6–9). Avicenna served the various local rulers in these cities certainly in his dual capacity as physician and political counselor, functions he had assumed already back home, but also as scientist-in-residence. Engaging in science and philosophy during the first three Abbasid centuries (750–1050) in Islam was done mostly under the political patronage of the rulers and the ruling elite who were the sponsors and also among the consumers of the scientific production. It was certainly a matter of prestige for a ruler to be flanked by the top scientists of his day, but patronage of the sciences was also seen, politically more importantly, as legitimizing his right to whatever throne he was occupying. As a result, many a ruler evinced sheer interest in science itself out of a desire to appear knowledgeable and participated in scientific debates, usually conducted in political fora. It is for this reason that we find Avicenna, involved in certain political/intellectual controversies in some of the cities in which he lived, addressing to political elites a scientific treatise instead of political oratory in his defense (Michot 2000; Reisman 2013, 14–22; Gutas 2014a, personal writings listed on p. 503). Science was much more integrally related to the social and political life and discourse during this period, which is also a significant factor in its rapid spread and development in the Islamic world.