By the time he was forty, Muhammad had begun to spend time in solitude, preoccupied with the questions that troubled him. He spent some nights alone in a small cave near Mecca. During one such night, known as the Night of Power, Muslims believe that the angel Gabriel appeared before him. Gabriel grabbed hold of Muhammad and ordered him to recite some words. He did so, and as he fled the cave in fear, he heard the angel say, "Oh, Muhammad, you are the messenger of God, and I am Gabriel."
After some time, and continuous teachings from Allah, Muhammad openly declared that there was only one God. He called on Meccans to reject their idols. Though monotheism was shared by Jews and Christians, its introduction into Mecca troubled the ruling class. As Muhammad's followers increased, so did the unease among his opposition.
As thought, opposition to Muhammad increased. The ruling families insulted him and threatened violence. Soon Muhammad knew that he and his followers must leave Mecca. In 619 CE, they moved for a short while to Ta'if, a nearby town. But they were not allowed to stay, and so they returned to Mecca. Things got worse for Muhammad when death claimed both his wife, Khadijah, and his uncle, Abu Talib. They had represented support and protection for the young Muslim community. However, it was also during this period, in 619 CE, that Muhammad was believed to have experienced his famous journey to heaven. With Gabriel guiding him, they journeyed first to a rock in Jerusalem, and from there Muhammad rode his faithful horse into heaven. It is claimed that he met other prophets, including Abraham, Moses, and Jesus. Finally, he stood in the presence of Allah.The course of history changed in 620 CE when some pilgrims from the northern town of Medina came through Mecca. At the time, Medina was being torn apart by the violence of two rival tribes. The pilgrims were moved by Muhammad's teachings and hoped he might settle the raging dispute. For the next two years, groups of people from Medina came to Mecca and converted to Islam. This inspired Muhammad, who instructed all Muslims to settle in Medina. In 622, Muhammad fled Mecca after hearing of a plot to assassinate him. Legend has it that he and a friend, Abu Bakr, hid in a cave. When his enemies rode by, a giant spider's web covered the mouth of the cave, and seeing the web, they assumed no one could have entered. From there Muhammad and Abu Bakr traveled safely to Medina. This journey is known as the Hijrah, and it holds special significance to Muslims. Muhammad's arrival into Medina marked the birth of a united Islamic community. The Hijrah signifies the beginning of the Islamic calendar.