In Zurvanite Zoroastrianism
Zurvanism was a branch of Zoroastrianism that sought to resolve the dilemma of the "twin spirits" of Yasna 30.3. The resolution, which probably developed out of the contact with Chaldea, was to have both Ahura Mazda and Angra Mainyu as twin sons of the First Principle "Time" (Avestan: Zurvan). Zurvanism was strongly criticized as a heresy during the Sassanid period (225-651) of Iranian history, an era in which it probably also had its largest following. Although the monist doctrine is not attested after the 10th century, some Zurvanite features are nonetheless still evident in present-day Zoroastrianism.
Zurvanism's principal feature is then the notion that both Ahura Mazda (MP: Ohrmuzd) and Angra Mainyu (Ahriman) were twin brothers, with the former being the epitome of good and the latter being the epitome of evil. Further, this dichotomy was by choice, that is, Angra Mainyu chose to be evil: "It is not that I cannot create anything good, but that I will not." And to prove this, he created the peacock.
The mythology of the twins is only attested in the post-Sassanid Syriac and Armenian polemic such as that of Eznik of Kolb. According to these sources the genesis saw Zurvan as an androgynous deity, existing alone but desiring offspring who would create "heaven and hell and everything in between." Zurvan then sacrificed for a thousand years. Towards the end of this period, Zurvan began to doubt the efficacy of sacrifice and in the moment of this doubt Ohrmuzd and Ahriman were conceived: Ohrmuzd for the sacrifice and Ahriman for the doubt. Upon realizing that twins were to be born, Zurvan resolved to grant the first-born sovereignty over creation. Ohrmuzd perceived Zurvan's decision, which He then communicated to His brother. Ahriman then preempted Ohrmuzd by ripping open the womb to emerge first. Reminded of the resolution to grant Ahriman sovereignty, Zurvan conceded, but limited kingship to a period of 9000 years, after which Ohrmuzd would rule for all eternity.
Read more about this topic: Angra Mainyu