Kasranids  The Kasranids (Persian: سلسله کسرانی) were a branch of the Shirvanshahs, who ruled the Shirvan region for 387 years. The word "Kasra" was derived from legendary king Kai Khosrow of Iran, reflecting a shift in naming tradition from Arabic to Persian and it was part of an effort to break with their Arabic roots by claiming to be successors of the Sassanids and the Kayanian dynasty. Yazid III Shirvanshah was accepted as the last of the Mazyadid dynasty and first of the Kasranids. He fathered eight children, five of which are named according to Persian customs. The Kasranids managed to establish alliances with the Bagrationi dynasty by marriage and with the Emirate of Derbent (whose line they would eventually absorb into the crown). They survived all invaders, notably the Seljuqs, the Ilkhanate, the Chupanids, and lastly, the Jalayirids as a vassal or tributary state. Shirvanshah Hushang was the last member of Kasranids. They were succeeded by House of Derbent, which was a junior branch of the Kasranids itself. Shervashidze was an early junior branch of Kasranids. Rulers are shown in bold. Different colours represent different countries and branches. Notable dynastic alliances are shown. The Kasranid kings were patrons of arts. Malu castle was erected by order of Shirvanshah Salar. Siniggala mosque was one of the major works completed during the reign of Shirvanshah Fariburz. Pir Husayn Khanqah, one of the most unusual buildings of Shirvan architecture, was built under order of Shirvanshah Afridun I. The Gates of Baku were constructed during the reign of Shirvanshah Manuchehr III. His son, Akhsitan I continued building several castles and making reforms among Round tower of Mardakan, Quadrangular tower of Mardakan, Ramana Tower. He was also responsible for changing the capital from Shamakhy to Baku after a devastating earthquake in 1192 (it has remained a prominent city in the region and is now the capital of Azerbaijan). Many poets, including Nizami, Khaqani, Arif Ardabili, Falaki Shirvani, Jamal Khalil Shirvani, lived in the court of Kasranids.