Before Muhammad unified Arabia under Islam, the region was in the 'Jahiliyyah' (Age of Ignorance), an era of tribal fragmentation with no unified central government.
In 610, Muhammad received his first revelation from God in a cave near Mecca. For over a decade, he preached monotheism peacefully without any military organization, facing severe persecution from the ruling Quraysh tribe.
In 622, Muhammad and his followers (approximately 70 families) migrated to Yathrib (later renamed Medina). This event, known as the Hijra, marked the beginning of the Islamic state and the formation of a defense force.
The Muslims of Medina faced repeated attacks from Mecca. Key battles included the victory at Badr (624), the setback at Uhud (625), and the successful defense during the Battle of the Trench (627).
The Treaty of Hudaybiyyah (628) established a temporary truce, allowing Muslims to perform pilgrimage. This peaceful period enabled Islam to spread rapidly, and the number of Muslims grew from 1,400 to 10,000. In 630, following a breach of the treaty by allies of the Quraysh, Muhammad marched on Mecca with a massive army.
Mecca surrendered peacefully. Muhammad cleared the Kaaba of idols, dedicating it to the worship of the one God. By his death in 632, most of the Arabian tribes had united under the banner of Islam.