Before the decline of the Seljuk Sultanate of Merv, the city of Ray had been part of Sultan Sanjar's territories. After Sanjar's capture in 1153 by bands of rebellious Oghuz Turks, his empire fell into chaos. In the midst of this confused situation, Ïnanch Sonqur was able to take Ray with assistance from the Bavandids.
Ïnanch soon began meddling in the affairs of the Seljuks of Hamadan. After the death of Sultan Muhammad ibn Mahmud in 1159, the amirs of the surrounding provinces disagreed on who should succeed him. In the end, Ïnanch's candidate Suleiman Shah won out. For the duration of Suleiman Shah's reign Ïnanch lent him support, but the sultan's incompetence eventually led the amirs to overthrow him and ask the Atabeg of Azerbaijan, Shams al-Din Eldigüz, to replace him with Arslan.
Arslan was accordingly installed in Hamadan in 1161. Eldigüz was able to gain Ïnanch's approval of the affair after arranging a marriage between his son Pahlavan and Ïnanch's daughter, Ïnanch Khatun. Arslan, however, ran into problems of his own, and eventually Ïnanch and a coalition of other amirs revolted and marched against Hamadan. Arslan, Eldigüz and Gird-Bazu defeated them in battle, forcing Ïnanch to flee.
After his defeat, Ïnanch made his way to the territories of the Bavandids. He then went to the court of the Shah of Khwarezm, Il-Arslan, who supplied him with an army and sent him back to northern Iran. Ïnanch invaded the area around Qazvin and Zanjan in 1166/7, but was unable to make any headway against the Seljuks or Eldigüz, and the loosely disciplined Khwarezmian troops were hated by the local people. Ïnanch retreated to Gurgan, but was able to enlist the support of the Bavandids and with their help managed to regain Ray.
Ïnanch's victory in reasserting his position was short lived. In 1169 Eldigüz invaded and besieged Ïnanch. Soon afterwards, he convinced some of Ïnanch's ghulams to murder him. Ray was taken by Eldigüz, who granted it to his son Pahlavan and left his vizier to administer the city.
- Al-E Bavand, Bosworth p. 178
- Al-E Bavand
- Bosworth, p. 177
- Bosworth, p. 178
- 'Ala'-al-Dawla Hasan
- "Al-E Bavand." Encyclopaedia Iranica Online. Encyclopædia Iranica. 2 February 2008. <http://www.iranicaonline.org/articles/al-e-bavand>
- "'Ala'-al-Dawla Hasan." Encyclopaedia Iranica Online. Encyclopædia Iranica. 2 February 2008. <http://www.iranicaonline.org/articles/ala-al-dawla-hasan-b>
- Bosworth, C.E. "The Political and Dynastic History of the Iranian World (A.D. 1000-1217)." The Cambridge History of Iran, Volume 5: The Saljuq and Mongol Periods. Edited by J.A. Boyle. Great Britain: Cambridge University Press, 1968. ISBN 0-521-06936-X
| Ruler of Ray