The Bundahishn ("Primal Creation") is the great Zoroastrian cosmological text, not part of the Avesta itself but a compilation in Middle Persian (Pahlavi), assembled in its fullest form in the ninth century CE, after the Islamic conquest of Iran, yet drawing on far older Avestan material now partly lost. It sets out the Zoroastrian account of the cosmos from beginning to end: the two primal spirits, the wholly good Ohrmazd (Ahura Mazda) and the destructive Ahriman, and the great cosmic drama in which Ahriman assaults the good creation, is trapped within the material world he has invaded, and is at last defeated; the making of the sky, water, earth, plants, the primal ox and the first man; and the final events, resurrection of the dead, the last judgement, and the frashokereti, the renovation in which the world is made perfect and evil is undone forever. As the most systematic surviving statement of Zoroastrian cosmic dualism and eschatology, the Bundahishn is indispensable for understanding how the tradition imagined the origin, purpose and end of the world.