The history of modern Egypt started after the permanent division of the Roman Empire into the Western Roman and Eastern Roman (Byzantine) empires in 395 A.D. Earlier Egyptian history is treated as the history of Ancient Egypt.
Egypt was an important part of the Byzantine Empire. As under the Romans, it served as a granary for other provinces. Alexandria, was a major port for Byzantine sea trade and, as before, the cultural center of Greek-language scholarship, including much early Christian theology.
In the fourth century Arius, an Alexandrian priest, originated a doctrine denying the Trinity. Although Arianism was ruled a heresy at the Council of Nicaea in 325, most Egyptians remained Arians. In the fifth century the doctrine of Monophysitism was adopted by the Byzantine church and then condemned, but the Coptic (Egyptian) church refused to give it up. Conflict became so bitter that when, in the seventh century, the Muslims invaded Egypt, the Copts made no effort to defend it.