Muhammad is born as a member of the tribe of Quraysh and the clan of Hāshim. His hometown of Mecca houses an ancient and famous pilgrimage sanctuary, the Kaʿbah. Although founded by Abraham, worship there has over time become dominated by polytheism and idolatry. Muhammad's conception is preceded by a dramatic crisis: his grandfather ʿAbd al-Muṭṭalib narrowly fails to implement a vow to sacrifice his favourite son and Muhammad's future father, ʿAbd Allāh, an obvious adaptation of the biblical story of the binding of Isaac (Genesis 22). Muhammad himself is born in 570, the same year in which the South Arabian king Abraha attempts to conquer Mecca and is thwarted by a divine intervention later alluded to in sūrah 105 of the Qurʾān. Muhammad's father passes away before his birth, leaving him in the care of his paternal grandfather, ʿAbd al-Muṭṭalib. At the age of six Muhammad also loses his mother Āminah, and at eight he loses his grandfather. Thereupon responsibility for Muhammad is assumed by the new head of the clan of Hāshim, his uncle Abū Ṭālib. While accompanying his uncle on a trading journey to Syria, Muhammad is recognized as a future prophet by a Christian monk.
At the age of 25, Muhammad is employed by a rich woman, Khadījah, to oversee the transportation of her merchandise to Syria. He so impresses her that she offers marriage. Khadījah is said to have been about 40, but she bears Muhammad at least two sons, who die young, and four daughters. The best known of the latter is Fāṭimah, the future wife of Muhammad's cousin ʿAlī, whom Shiʿi Muslims regard as Muhammad's divinely ordained successor. Until Khadījah's death some three years before Muhammad's emigration (hijrah) to Medina in 622, Muhammad takes no other wife, even though polygamy is common.Muhammad's prophetic initiation occurs at the age of 40. During a period of devotional withdrawal atop one of the mountains in the vicinity of Mecca, the angel Gabriel appears to him in an awe-inspiring encounter and teaches him the opening verses of sūrah 96 of the Qurʾān: "Recite in the name of your Lord who creates, / creates man from a clot! / Recite for your lord is most generous…." Muhammad is greatly perturbed after this first revelation but is reassured by Khadījah and her cousin, Waraqah ibn Nawfal, a learned Christian who confirms Muhammad's prophetic status. Muhammad continues to receive revelations but for three years limits himself to speakingabout them in private. When God finally commands him to take up public preaching, he initially encounters no opposition. However, after the Qurʾānic proclamations begin to deny the existence of gods other than Allāh and thereby to attack the religious beliefs and practices of the Quraysh tribe, tensions arise between Muhammad and his small circle of adherents, on the one hand, and the remaining inhabitants of Mecca, on the other. As a result, some of Muhammad's followers are forced to seek temporary refuge with the Christian ruler of Ethiopia. For some years, the other chief clans of Mecca even refuse to trade and intermarry withMuhammad's clan, since the latter continues to offer him protection. Sometime after the end of this boycott, one of the most famous events in the Prophet's ministry takes place: his so-called Night Journey, during which he is miraculously transported to Jerusalem to pray with Abraham, Moses, Jesus, and other prophets. From there Muhammad continues to ascend to heaven, where God imposes on him the five daily prayers of Islam.
About 619, both Khadījah and Muhammad's uncle Abū Ṭālib die, and another uncle, Abū Lahab, succeeds to the leadership of the clan of Hāshim. Abū Lahab withdraws the clan's protectionfrom Muhammad, meaning that the latter can now be attacked without fear of retribution and is therefore no longer safe at Mecca. After failing to win protection in the nearby town of Al-Ṭāʾif, Muhammad secures a pledge of protection from a representative number of the inhabitants of the oasis town of Yathrib, also known as Medina (from its Qurʾānic appellation al-madīnah, "the town"). This promise enables Muhammad and his followers to leave Mecca for Medina, which, unlike Mecca, is partly inhabited by Jewish tribes. Together with Abū Bakr, the future first caliph, Muhammad is the last to depart. It is only because he is warned by Gabriel that he narrowly escapes an assassination plot by theQuraysh.
At Medina, Muhammad has a house built that simultaneously serves as a prayer venue for his followers. He also drafts a covenant that joins together "the Believers and Submitters [or Muslims] of Quraysh and of Yathrib" as well as some of Medina's Jewish tribes into a community (ummah) recognizing Muhammad as the "Messenger of God." However, relations with the Jews of Medina steadily worsen. Eighteen months after the emigration, a revelation bids the Muslims to pray in the direction of the Meccan Kaʿbah, rather than to continue facing toward Jerusalem as is Jewish practice. At about the same time, the Medinan Muslims begin raiding Meccan caravans. When,during one of these raids, they are surprised by a Meccan relief force at Badr in 624, the Muslims, aided by angels, score a surprising victory. In response, the Meccans try to capture Medina, once in 625 in the Battle of Uḥud and again in 627 in the so-called Battle of the Trench; both attempts to dislodge Muhammad are ultimately unsuccessful. After each of the three major military encounters with the Meccans, Muhammad and his followers manage to oust another of the three main Jewish tribes of Medina. In the case of the last Jewish tribe to be displaced, the Qurayẓah, all adult males are executed, and the women and children are enslaved.
In 628 Muhammad makes the bold move of setting out to perform the pilgrimage to Mecca. The Meccans are determined to prevent the Muslims from entering the city, and Muhammad halts at Al-Ḥudaybiyyah, on the edge of the sacred territory of Mecca. A treaty is concluded between the two parties: hostilities are to cease, and the Muslims are given permission to make the pilgrimage to Mecca in 629. Two months later Muhammad leads his forces against the Jewish oasis of Khaybar, north of Medina. After a siege, it submits, but the Jews are allowed to remain on condition of sending half of their date harvest to Medina. The following year, Muhammad and his followers perform the pilgrimage as stipulated by the treaty of Al-Ḥudaybiyyah. Subsequently, however, an attack byMeccan allies upon allies of Muhammad leads to the latter's denunciation of the treaty with the Meccans. In 630 he marches a substantial army on Mecca. The town submits, and Muhammad declares an amnesty.
After his return to Medina, Muhammad receives deputations from various Arabian tribes who declare their allegiance to the Muslim polity. Still in 630, Muhammad embarks on a campaign to the Syrian border and reaches Tabūk, where he secures the submission of various towns. Muhammad personally leads the pilgrimage to Mecca in 632, the so-called Farewell Pilgrimage, the precedent for all future Muslim pilgrimages. He dies in June 632 inMedina. Since no arrangement for his succession has been made, his death provokes a major dispute over the future leadership of the community he has founded.