Islam arose at a time when the people of the Arabian Peninsula were ready for a unifying force. Islam knew no borders or racial lines, everyone who believed was accepted into the faith. It arose at a time when the Byzantine Empire was on the verge of collapse from poor leadership and corruption. At the same time, the Persian Empire was also very vulnerable. Shortly before his death, the prophet Muhammad made his intentions clear, he wanted to expand Islam by sending his forces beyond the limits of the Arabian Peninsula.
On the eve of Muhammad's death, Abu Bakr was selected as the new leader or caliph. At first, several of the tribes broke away and refused to accept the teachings of Islam. Abu Bakr did not hesitate, he immediately dispatched his forces and in a short time all again of Arabian Peninsula was again under Muslim control. Abu Bakr would die in 634, and he was replaced by the caliph Umar ibn al-Khattab. Umar ibn al-Khattab was even more aggressive than his predecessor. He started by invading Syria, and defeating various military forces of the Byzantine Empire. Next, he captured Jerusalem, Damascus, and Egypt. Umar was unstoppable as he turned his attention to the Persian Empire (Iraq and Iran). He would defeat the Persians just before his death in 644. Umar was replaced by the caliph Uthman ibn Affan. Under the leadership of Uthman, Muslim armies moved for the first time into North Africa.
Then, when Uthman was assassinated in 656 civil war would break out between Uthman's family the Umayyads, and the son-in-law of Muhammad, Ali ibn Abi Talib, who had been chosen to replace Uthman. At first, Ali's forces did very well. So Ali was not surprised when the leader of the Umayyads named Muawiyah, asked for peace negotiations. At once, Ali decided to negotiate so he stopped the fighting. At the same time, a group called the Kharijites, who were deeply devoted Muslims said that Ali's decision to stop the fighting had gone against God's will. They argued that only God had the right to stop the fighting. Before long, Ali was dead. He had been stabbed by a Kharijite and now Muawiyah claimed the title of caliph. The followers of Ali called the Shi'ah, continued to oppose the Umayyad leadership. Then after the death of Muawiyah his son Yazid became caliph but the Shi'ah instead wanted the son of Ali name Husayn to become caliph. However, this would never happen, as Husayn and his small group were attacked outside of the village of Karbala, and Husayn was beheaded.
The Umayyad dynasty lasted almost one hundred years. During this time Islam spread across North Africa all the way to the Atlantic coast. The Ummayad's crossed the Straits of Gibraltar and invaded the Iberian Peninsula (Spain and Portugal) with little opposition. Then, when the Umayyad's entered southern France, they would not be stopped until in 732, a Frankish army under the command of Charles Martel finally defeated them. The Abbasid ruled Islam from 750 to 1258. They became amazingly wealthy and powerful, stretching from Morocco to India. They invited intellectual thought, and commissioned architects to build amazing palaces. At the same time they implemented the Islamic legal system which was based on the Quran.