section_path: Biography/Career/In Isfahan
section_name: In Isfahan
paragraph_text: In Isfahan
  
  Avicenna was subsequently released, and went to Isfahan, where he was well received by Ala al-Dawla. In the words of Juzjani, the Kakuyid ruler gave Avicenna "the respect and esteem which someone like him deserved." Adamson also says that Avicenna's service under Ala al-Dawla "proved to be the most stable period of his life." Avicenna served as the advisor, if not vizier of Ala al-Dawla, accompanying him in many of his military expeditions and travels. Avicenna dedicated two Persian works to him, a philosophical treatise named Danish-nama-yi Ala'i ("Book of Science for Ala"), and a medical treatise about the pulse.
  
  During the brief occupation of Isfahan by the Ghaznavids in January 1030, Avicenna and Ala al-Dawla relocated to the southwestern Iranian region of Khuzistan, where they stayed until the death of the Ghaznavid ruler Mahmud (r. 998–1030), which occurred two months later. It was seemingly when Avicenna returned to Isfahan that he started writing his Pointers and Reminders. In 1037, while Avicenna was accompanying Ala al-Dawla to a battle near Isfahan, he contracted a severe colic, which he had been suffering from throughout his life. He died shortly afterwards in Hamadan, where he was buried.