The Derafsh Kāviān (Middle Persian: Drafš-ī Kāvayān, Modern Persian: درفش کاویانی Derafš-e Kāviān) was the legendary royal standard (vexilloid) of the Sasanian kings. The banner was also sometimes called the "Standard of Jamshid" (Drafš-ī Jamshid), the "Standard of Fereydun" (Drafš-ī Freydun), and the "Royal Standard" (Drafš-ī Kayi).
The name Drafš-e Kāvīān means "the standard of the kay(s)" (i.e., "kings", kias, kavis ) or "of Kāva." The latter meaning is an identification with an Iranian legend in which the Derafš-e Kāvīān was the standard of a mythological blacksmith-turned-hero named Kaveh (Modern Persian: Kāveh), who led a popular uprising against the foreign demon-like ruler Dahāg (Modern Persian: Zahhāk). Recalling the legend, the 10th-century epic Shahnameh recasts Zahhak as an evil and tyrannical ruler, against whom Kāveh called the people to arms, using his leather blacksmith apron as a standard, with a spear as its hoist. In the story, after the war that called for the kingship of Fereydun (Middle Persian: Frēdōn) had been won, the people decorated the apron with jewels and the flag became the symbol of Iranian independence and resistance against foreign tyranny.
By the late Sasanian era (224-651), a real Drafš e Kāvīān had emerged as the standard of the Sasanian dynasties. It was representative of the Sassanid state—Ērānšāhr (or "Iranian Empire"). Eran Shahr means Aryan Empire in Middle Persian—and may so be considered to have been the first "national flag" of Iran. The banner consisted of a star (the akhtar) on a purple field, was encrusted with jewels and had trailing red, gold and purple streamers on its edges. The term achtar was significant since the star also represented "fortune", and the capture and destruction of the banner on a field of battle implied the loss of the battle (and hence the loss of fortune). Following the defeat of the Sassanids at the Battle of al-Qādisiyyah, the Sassanid standard was recovered by one Zerar bin Kattab, who received 30,000 dinars for it. After the jewels were removed, Caliph Umar is said to have burned the standard.