The Battle of Heliopolis or Ayn Shams was a decisive battle between Arab Muslim armies and Byzantine forces for the control of Egypt. Though there were several major skirmishes after this battle, it effectively decided the fate of the Byzantine rule in Egypt, and opened the door for the Muslim conquest of the Byzantine Exarchate of Africa. Background to the Islamic conquests At the time of the death of Muhammad on 8 June 632, Islam had effectively unified the entire Arabian peninsula. Within the next twelve years, under the rule of the first two Caliphs an Islamic empire arose that annexed all of what used to be the Sassanid Empire, and most of the eastern provinces of the Byzantine Empire. The Muslim Caliphate continued to expand until by the turn of the 8th-century, it stretched from the Atlantic Ocean in the west to Central Asia in the east. Under the first Caliph, Abu Bakr, force was used to prevent unrest and rebellion from causing the collapse of the new Islamic state, and the first raids were carried out into the territory of the Sassanid Empire. But the all-out attack on the neighboring empires came with the ascension of the second Caliph, Umar. When the new Caliph began his rule in 634, the international situation in the Middle East could hardly have been more propitious for a new and ambitious power: the region's two traditional main powers, the Byzantine and the Sassanid Empires, had exhausted each other in a conflict that raged for over 20 years. By the 630s, Sassanid Persia had descended into a state of civil war, while Byzantium, under the aging emperor Heraclius, its manpower and resources depleted in the struggle with its old adversary, was struggling to re-establish its authority in its newly re-conquered eastern provinces. The two states were thus in considerable internal turmoil, and unable to either stop the Muslim expansion or to recover from its first blows. It is unknown whether Umar intended from the outset to conquer both the Sassanid and the Byzantine Empire, or simply allowed raids, and then, perceiving their weakness, followed up with full-scale invasion. Arab conquest of Egypt After successfully conquering Syria between 634 and 638, the Arabs turned their attention to Egypt. The attack on Africa took the Byzantines by surprise. Heraclius's generals had advised him that the Muslims would need a generation to digest Persia before undertaking