The Kakuyids were a Daylamite dynasty that held power in Isfahan (c. 1008–c. 1051). They were also the atabegs (governors) of Yazd and Abarquh from c. 1051 to the mid-12th century. The Kakuyids were given control of Isfahan in or before 1008 by the Sayyida, who held the regencies of her young Buyid sons Majd al-Daula of Ray and Shams al-Daula of Hamadan. The man who was given the administration of the city was Ja'far 'Ala' al-Daula ibn Kakuya, who was a cousin of Majd al-Daula on his mother's side. Over time, he effectively became independent of Buyid control. At times Ja'far 'Ala' al-Daula acted as an ally of the Buyids; when Shams al-Daula was faced with a revolt in Hamadan, for example, he turned to the Kakuyid for helped. Shortly after Shams al-Daula died and was succeeded by Sama' al-Daula, however, the Kakuyids invaded and took control of Hamadan in 1023 or 1024. They then moved on and seized Hulwan from the Annazids. The Buyid Musharrif al-Daula, who ruled over Fars and Iraq, forced the Kakuyids to withdraw from Hulwan, but they retained Hamadan. Peace was made between the two sides, and a matrimonial alliance was eventually arranged. Ja'far 'Ala' al-Daula was succeeded in 1041 by his son Faramurz, while in Hamadan another Kakuyid, Garshasp I Abu Kalijar 'Ala' al-Daula, took power. Faramurz's reign was cut short by the Seljuks, who after a year-long siege of Isfahan took the city in 1051 or 1052. Despite this, Faramurz was given Yazd and Abarquh in fief by the Seljuks. The Kakuyids remained the governors of these provinces until sometime in the mid-12th century; their rule during this time was known for the construction of mosques, canals and fortifications.

