Garshasp II
Garshasp II (Persian: گرشاسپ), was the last Kakuyid Emir of Yazd and Abarkuh. He was the son of Ali ibn Faramurz. Biography. After the death of Garshasp's father Ali ibn Faramurz in 1095 in a battle near Ray, he succeeded him as the head of the Kakuyid family, where he became an honored figure at the Saljuq court. At the beginning of the twelfth century, he enjoyed the favor of Sultan Muhammad. However, in 1118, when Muhammad's son Mahmud II ascended the throne, Garshasp fell into disgrace; slander about him spread to the court that made  him lose confidence, and made Mahmud send a military force to Yazd where Garshasp was arrested and jailed in Jibal, while Yazd was granted to the royal cupbearer. Garshasp, however, escaped and returned to Yazd, where he requested protection from Ahmad Sanjar (Garshasp's wife was the sister of Ahmad). Garshasp urged Ahmad to invade the domains of Mahmud II in Central Persia, and gave him information on how to march to Central Persia, and the ways to combat Mahmud II. Ahmad accepted and advanced with an army to the west in 1119, where he together with "five kings" defeated  Mahmud II at Saveh. The kings who aided Ahmad during the battle was Garshasp himself, the Emir of Sistan and the Khwarazm-Shah, including two other unnamed kings. After being victorious, Ahmad then restored the domains of Garshasp II. After that he returned to Yazd where disappeared from the chronicles, however, there is a mention of him fighting the Kara-Khitan Khanate, where he was reportedly killed, and which marked the end of the Kakuyid dynasty. However, his descendants continued to rule as Atabegs of Yazd.