Zahāk is a personification of evil in Iranian mythology and historiography. In the Avesta and Zoroastrian tradition, Zahāk (going under the name Aži Dahāka) is considered the son of Ahriman, the foe (though ultimately subservient) of Ahura Mazda. In the Shāhnāmeh of Ferdowsi, Zahāk is the son of an Arab ruler named Merdās.

Etymology and derived words (nominative ) is the Avestan word for "serpent" or "dragon".For Azi Dahaka as dragon see: Ingersoll, Ernest, et al., (2013). The Illustrated Book of Dragons and Dragon Lore. Chiang Mai: Cognoscenti Books. ASIN B00D959PJ0 It is cognate to the Vedic Sanskrit word , "snake", and without a sinister implication.

The original meaning of dahāka is uncertain. Among the meanings suggested are "stinging" (source uncertain), "burning" (cf. Sanskrit ), "man" or "manlike" (cf. Khotanese ), "huge" or "foreign" (cf. the Dahae people and the Vedic dasas). In Persian mythology, Dahāka is treated as a proper noun, while the form Zahhāk, which appears in the Shāhnāmeh, was created through the influence of the unrelated Arabic word () meaning "one who laughs".

The Avestan term Aži Dahāka and the Middle Persian aždahāg are the source of the Middle Persian Manichaean demon of greed Až,Appears numerous time in, for example: D. N. MacKenzie, Mani’s Šābuhragān, pt. 1 (text and translation), BSOAS 42/3, 1979, pp. 500-34, pt. 2 (glossary and plates), BSOAS 43/2, 1980, pp. 288-310. Old Armenian mythological figure Aždahak, Modern Persian 'aždehâ/aždahâ', () Tajik Persian 'aždaho', () Urdu 'aždahā (), as well as the Kurdish ejdîha () which usually mean "dragon".

The name also migrated to Eastern Europe,Detelić, Mirjana. "St Paraskeve in the Balkan Context" In: Folklore 121, no. 1 (2010): 101 (footnote nr. 12). Accessed March 24, 2021. http://www.jstor.org/stable/29534110. assumed the form "ažhdaja" and the meaning "dragon", "dragoness"Erben, Karel Jaromír; Strickland, Walter William. Russian and Bulgarian folk-lore stories. London: G. Standring. 1907. p. 130. or "water snake"Kropej, Monika. Supernatural beings from Slovenian myth and folktales. Ljubljana: Institute of Slovenian Ethnology at ZRC SAZU. 2012. p. 102. in Balkanic and Slavic languages.Kappler, Matthias. Turkish Language Contacts in Southeastern Europe. Piscataway, NJ, USA: Gorgias Press, 2010. p. 256. https://doi.org/10.31826/9781463225612

Despite the negative aspect of Aži Dahāka in mythology, dragons have been used on some banners of war throughout the history of Iranian peoples.

The Ažhdarchid group of pterosaurs are named from a Persian word for "dragon" that ultimately comes from Aži Dahāka.

Aži Dahāka (Dahāg) in Zoroastrian literature

In the Avesta, the collection of religious texts of Zoroastrianism, Aži Dahāka is the most significant and long-lasting of the ažis. He is described as a monster with three mouths, six eyes, and three heads, cunning, strong, and demonic. In other respects Aži Dahāka has human qualities, and is never a mere animal.

Aži Dahāka appears in several of the Avestan myths and is mentioned parenthetically in many more places in Zoroastrian literature.

In a post-Avestan Zoroastrian text, the Dēnkard, Aži Dahāka is possessed of all possible sins and evil counsels, the opposite of the good king Jam (or Jamshid). The name Dahāg (Dahāka) is punningly interpreted as meaning "having ten (dah) sins". His mother is Wadag (or Ōdag), herself described as a great sinner, who committed incest with her son.

In the Avesta, Aži Dahāka is said to have lived in the inaccessible fortress of Kuuirinta in the land of Baβri, where he worshipped the yazatas Arədvī Sūrā (Anāhitā), divinity of the rivers, and Vayu divinity of the storm-wind. Based on the similarity between Baβri and Old Persian Bābiru (Babylon), later Zoroastrians localized Aži Dahāka in Mesopotamia, though the identification is open to doubt. Aži Dahāka asked these two yazatas for power to depopulate the world. Being representatives of the Good, they refused.

In one Avestan text, Aži Dahāka has a brother named Spitiyura. Together they attack the hero Yima (Jamshid) and cut him in half with a saw, but are then beaten back by the yazata Ātar, the divine spirit of fire.

According to the post-Avestan texts, following the death of Jam ī Xšēd (Jamshid), Dahāg gained kingly rule. Another late Zoroastrian text, the Mēnog ī xrad, says this was ultimately good, because if Dahāg had not become king, the rule would have been taken by the immortal demon Xešm (Aēšma), and so evil would have ruled upon the earth until the end of the world.

Dahāg is said to have ruled for a thousand years, starting from 100 years after Jam lost his Khvarenah, his royal glory (see Jamshid). He is described as a sorcerer who ruled with the aid of demons, the daevas (divs).

The Avesta identifies the person who finally disposed of Aži Dahāka as Θraētaona son of Aθβiya, in Middle Persian called Frēdōn. The Avesta has little to say about the nature of Θraētaona's defeat of Aži Dahāka, other than that it enabled him to liberate Arənavāci and Savaŋhavāci, the two most beautiful women in the world. Later sources, especially the Dēnkard, provide more detail. Feyredon is said to have been endowed with the divine radiance of kings (Khvarenah, New Persian farr) for life, and was able to defeat Dahāg, striking him with a mace. However, when he did so, vermin (snakes, insects and the like) emerged from the wounds, and the god Ormazd told him not to kill Dahāg, lest the world become infected with these creatures. Instead, Frēdōn chained Dahāg up and imprisoned him on the mythical Mt. Damāvand (later identified with Damāvand).

The Middle Persian sources also prophesy that at the end of the world, Dahāg will at last burst his bonds and ravage the world, consuming one in three humans and livestock. Kirsāsp, the ancient hero who had killed the Az ī Srūwar, returns to life to kill Dahāg.

In the Denkard, Zahhak is said to be the originator of Judaism

Zahhak in the Shahnameh In Ferdowsi's epic poem, the Shāhnāmeh, written between 977 and 1010, the legend is retold with the main character given the name of Zahhāk and changed from a supernatural monster into an evil human being.

Zahhāk in Persia

According to Ferdowsi, Zahhāk was born as the son of a ruler named Merdās (). Because of his Arab lineage, he is sometimes called Zahhāk-e Tāzī''' (), meaning "Zahhāk the Tayyi". He is handsome and clever, but has no stability of character and is easily influenced by his counselors. Ahriman therefore chooses him as a tool to sow disorder and chaos. When Zahhāk is a young man, Ahriman first appears to him as a glib, flattering companion, and by degrees convinces him to kill his own father and inherit his kingdom, treasures and army. Zahhāk digs a deep pit covered over with leaves in a path to a garden where Merdās would pray each morning; Merdās falls in and is killed. Zahhāk thus ascends to the throne.

Ahriman then presents himself to Zahhāk as a marvelous cook. After he presents Zahhāk with many days of sumptuous feasts (introducing meat to the formerly vegetarian human cuisine), Zahhāk is willing to give Ahriman whatever he wants. Ahriman merely asks to kiss Zahhāk on his two shoulders, and Zahhāk permits this. Ahriman places his lips upon Zahhāk's shoulders and suddenly disappears. At once, two black snakes grow from Zahhāk's shoulders. They cannot be surgically removed, as another snake grows to replace one that has been severed. Ahriman appears to Zahhāk in the form of a skilled physician. He counsels Zahhāk that attempting to remove the snakes is fruitless, and that the only means of soothing the snakes and preventing them from killing him is to sate their hunger by supplying them with a stew made from two human brains every day.

Zahhāk the Emperor

At this time, Jamshid, the ruler of the world, becomes arrogant and loses his divine right to rule. Zahhāk presents himself as a savior to discontented Iranians seeking a new ruler. Collecting a great army, Zahhāk hunts Jamshid for many years before finally capturing him. Zahhāk executes Jamshid by sawing him in half and ascends to Jamshid's prior throne. Among his slaves are two of Jamshid's daughters, Arnavāz and Shahrnāz (the Avestan Arənavāci and Savaŋhavāci). Each day, Zahhāk's agents seize two men and execute them so that their brains can feed Zahhāk's snakes. Two men, called Armayel and Garmayel, seek to rescue people from being killed from the snakes by learning cookery and becoming Zahhāk's royal chefs. Each day, Armayel and Garmayel save one of the two men by sending him off to the mountains and faraway plains, and substitute the man's brain with that of a sheep. The saved men are the mythological progenitors of the Kurds.Masudi. Les Prairies d’Or. Trans. Barbier de Meynard and Pavet de Courteille, 9 vols. Paris: La Société Asiatique, 1861.Özoglu, H. (2004). Kurdish Notables and the Ottoman State: Evolving Identities, Competing Loyalties, and Shifting Boundaries. Albany: State University of New York Press, pp. 30.

Zahhāk's tyranny over the world lasts for centuries. One night, Zahhāk dreams of three warriors attacking him. The youngest warrior knocks Zahhāk down with his mace, ties him up, and drags him off toward Mount Damāvand as a large crowd follows. Zahhāk wakes and shouts so loudly that the pillars of the palace shake. Following Arnavāz's counsel, Zahhāk summons wise men and scholars to interpret his dream. His hesitant counsellors remain silent until the most fearless of the men reports that the dream is a vision of the end of Zahhāk's reign at the hands of Fereydun, the young man with the mace. Zahhāk is thrilled to learn the identity of his enemy, and orders his agents to search the entire country for Fereydun and capture him. The agents learn that Fereydun is a boy being nourished on the milk of the marvelous cow Barmāyeh. The spies trace Barmāyeh to the highland meadows where it grazes, but Fereydun and his mother have already fled before them. The agents kill the cow, but are forced to return to Zahhāk with their mission unfulfilled.

Revolution against Zahhāk

Zahhāk lives the next few years in fear and anxiety of Fereydun, and thus writes a document testifying to the virtue and righteousness of his kingdom that would be certified by the kingdom's elders and social elite, in the hope that his enemy would be convinced against exacting vengeance. Much of the summoned assembly indulge the testimony out of fear for their lives. However, a blacksmith named Kāva (Kaveh) speaks out in anger for his children having been murdered to feed Zahhāk's snakes, and for his final remaining son being sentenced to the same fate. Zahhāk orders for Kāva's son to be released in a bid to coerce Kāva into certifying the document, but Kāva tears up the document, leaves the court, and creates a flag out of his blacksmith's apron as a standard of rebellion – the Kāviyāni Banner, (). Kāva proclaims himself in support of Fereydun as ruler, and rallies a crowd to follow him to the Alborz mountains, where Fereydun is now living as a young man. Fereydun agrees to lead the people against Zahhāk and has a mace made for him with a head like that of an ox.