Zoroastrian teaching begins from a refusal. Ahura Mazda, the Wise Lord, is wholly good, and evil does not originate with him. This solves in one move the problem that monotheisms with an omnipotent creator have to address at length, and it does so at a cost the tradition has argued about ever since.
The Gathas, the seventeen hymns attributed to Zarathustra himself and the oldest layer of the Avesta, describe two primal spirits, twins in some readings, who at the beginning made a choice between asha, truth and right order, and druj, the lie. One chose truth, the other the lie, and everything that follows is the working out of that choice. Later Zoroastrian literature, particularly the Pahlavi texts of the ninth century, sets Ahura Mazda or Ohrmazd against Angra Mainyu or Ahriman as cosmic antagonists, describes a limited period of mixture in which the world is contested, and predicts the frashokereti, the final making-wonderful, in which evil is destroyed, the dead are raised, and the world is restored.
The disputed question is what kind of system this is. On one reading it is monotheism with an adversary: Ahura Mazda alone is worshipped, Angra Mainyu is not his creation and not his equal, and his defeat is guaranteed. On another it is a genuine dualism, with two uncreated principles. Zoroastrian communities and scholars divide on this, and the Gathas can be construed either way; a further reading takes the two spirits as aspects within Ahura Mazda's own creative act. The Zurvanite tendency attested in the Sasanian period made both the offspring of Time, and is now extinct.