Egypt was conquered in 619 by the prominent Sasanian military leader Shahrbaraz, who governed the province briefly until he appointed Shahralanyozan as the new governor. Sahralanyozan held the title of karframan-idar ("steward of the court") and was the most powerful Iranian in Egypt. Besides being governor of Egypt, he was also the tax-collector of the province, and most likely resided in Faiyum. In Middle Persian texts, the country is known as Agiptus and is depicted as the following; agiptus būm kē misr-iz xwānēnd ("the land of Agiptus which is also called Misr").a[›] The Nile is termed as rōd ī nīl. Several cities of the country are mentioned, such as Touphis, Kynon, Babylon, including some others, which displays the subjugation of the Sasanians in the area.
Although Egypt suffered much damage during its invasion by the Sasanians, after the conquest was complete, peace, toleration and rehabilitation followed. Furthermore, the Sasanians retained the same administrative structure as the Byzantine Empire. The Sasanians did not try to force the population of Egypt to renounce their religion and practise Zoroastrianism. They did, however, persecute the Byzantine Church whilst supporting the Monophysite Church. The Copts took advantage of the circumstances and obtained control over many of the Orthodox churches. There were numerous Sasanian stations in the country, which included Elephantine, Herakleia, Oxyrhynchus, Kynon, Theodosiopolis, Hermopolis, Antinopolis, Kosson, Lykos, Diospolis, and Maximianopolis. The assignment of those stations was to collect taxes and get supplies for the military. Several papyrus papers mentions the collection of taxes by the Sasanians, which shows that they used the same method of the Byzantines for collecting taxes. Another papyrus mentions an Iranian and his sister, which indicates that some families had settled in Egypt along with the soldiers.
In 626, Shahrbaraz quarrelled with the Sasanian king Khosrow II (r. 590-628) and mutinied against him. It is not known whom Sahralanzoyan supported, since he is not mentioned in any source thereafter and Shahrbaraz is described as the ruler of the province. Following the end of the Byzantine–Sasanian war in 628, by 630/1, Egypt had returned to Byzantine hands. Although Sasanian rule in Egypt wasn't long compared to that of the Byzantines, some marks of their influences is still present today; the Coptic New Year celebration called Nayrouz, where martyrs and confessors are honoured, stems from the Iranian New Year celebration Nowruz. Another commemoration which is related to the Sasanians is the Holy Cross Day, that celebrates the discovery of the cross that Jesus was crucified on and its homecoming to Jerusalem in 628. Furthermore, Sasanian influence on Coptic art is also apparent.