Leo had caused a controversy in the Orthodox church by marrying for a third time. His third wife Eudocia died in childbirth in 901, and the Patriarch, Nicholas Mysticus, forbade him from marrying a fourth time. Zoe therefore became Leo's mistress. In 905, Zoe gave birth to a son, the future Constantine VII, whom Leo wanted to legitimize by marrying Zoe. Nicholas still opposed this and conspired to overthrow Leo; he was removed from office in 907 and replaced by Euthymius Syncellus, who allowed the marriage but refused to allow Zoe to use the title "empress."
Leo died in 912. Nicholas was reinstated as patriarch by his successor Alexander III and Zoe was banished from the imperial palace. She returned when Alexander died in 913, but Nicholas forced her to enter a convent. In 914 she conspired against Nicholas, overthrew him, and took control of the regency for her son Constantine; he was reinstated again when he finally agreed to recognize her as empress.
At the same time, the Bulgar ruler Simeon claimed the throne, and attempted to marry his daughter to Constantine, which Zoe refused. In 915 she defeated an Arab invasion of Armenia, and made peace with them in order to be free to attack Simeon in 917, with help from the Pechenegs. The Pechenegs and Byzantines quarrelled and never fought together, being defeated separately by Simeon (the Byzantines at the Battle of Anchialus), who again demanded the Byzantine throne. Zoe tried to ally with Serbia and the Magyars against him. This also failed, and the Arabs, encouraged by the empire's weakness, renewed their raids.