It happened more than a millenium ago. The collapse of the Roman and Byzantine Empires and the dissolution of their military might left the vast provinces and suzerainties exposed and defenseless. The Persians were also in decline around the same time. The fierce Mohammedan armies gained strength through conquests shortly after that, filling up the power vacuum left by the Romans and the Persians. The first lands to fall were those of the Christian Levant, including Mesopotamia and Egypt, the latter falling to the invading Mohammedans around 640AD.
Also It didn’t help there was a huge rift between Constantinople and Alexandria over the use of icons.