The Kayanids, also Kias or Kianids/Kiyanis or Kianians, are a dynasty of Persian tradition and folklore which ruled after the Pishdadids, and before the historical Achaemenids. Considered collectively, the Kayanian kings are the heroes of the Avesta, the sacred texts of Zoroastrianism, and of the Shahnameh, Iran's national epic.
As an epithet of kings and the reason the dynasty is so called, Middle- and New Persian "Kay" or "Kia(an)" is a continuation of Avestan kavi (or kauui) "king" and also "poet-sacrificer" or "poet-priest." The word is also etymologically related to the Avestan notion of kavaēm kharēno, the "divine royal glory" that the Kianian kings were said to hold. The Kiani Crown is a physical manifestation of that belief.
The earliest known foreshadowing of the major legends of the Kayanian kings appears in the Yashts of the Avesta, where the dynasts offer sacrifices to the gods in order to earn their support and to gain strength in the perpetual struggle against their enemies, the Anaryas (not Aryans, sometimes identified as the Turanians).
In Yasht 5, 9.25, 17.45-46, Haosravah, a Kayanian king later known as Kay Khosrow, together with Zoroaster and Jamasp (a premier of Zoroaster's patron Vishtaspa, another Kayanian king) worship in Airyanem Vaejah. The account tells that King Haosravah united the various Aryan tribes into one nation (Yasht 5.49, 9.21, 15.32, 17.41).
Towards the end of the Sassanid period, Khosrow II (590-628, named after the Kay Khosrow of legend) ordered a compilation of the legends surrounding the Kayanians. The result was the Khwaday-Namag or "Book of Lords," a long historiography of the Iranian nation from the primordial Gayomart to the reign of Khosrow II, with events arranged according to the perceived sequence of kings and queens, fifty in number.