The Bundahišn is a Zoroastrian cosmological and cosmogonic text composed in Middle Persian (Pahlavi), most likely compiled in something close to its surviving form around the 9th century CE — notably, this places its composition after the Arab conquest of Persia, meaning it was assembled by priests actively working to preserve Zoroastrian cosmology at precisely the moment their faith's political and social position was collapsing.
The text survives in two principal recensions: the shorter "Indian Bundahishn," preserved among the Parsi community in India, and the longer "Greater" or "Iranian Bundahishn," which contains substantially more historical and genealogical material. Both draw on the lost Damdad Nask, one of the original twenty-one books of the Avesta, meaning the Bundahišn functions as a kind of salvage operation — Middle Persian prose preserving Avestan-era cosmological content that would otherwise have been lost entirely when the original text perished.
Structurally, the Bundahišn begins at the true beginning: the primordial state before creation, in which the wise lord Ohrmazd (Ahura Mazda) exists in light above, and the destructive spirit Ahriman exists in darkness below, each initially unaware of the other. Ohrmazd creates the spiritual and then material world in a deliberate sequence — sky, water, earth, plants, animals and finally the first human, Gayomard — specifically as a strategy to draw Ahriman's inevitable attack into a fixed, limited period of time rather than allowing chaos to persist forever.
Ahriman's assault, when it comes, corrupts and mixes with every part of creation — introducing death, disease, predation and moral evil into what had been a perfect world. The remainder of cosmic history, as the Bundahišn frames it, is the long process of separating this mixture back out again, restoring the world to its original uncorrupted state. History itself, in this cosmology, is a temporary and ultimately reversible contamination.