In 622 C.E. the Meccan prophet Muhammad immigrated to Yathrib, later known as Medina (al-nabi), on the invitation of a group of Arabs from that town. This event is termed hijra. Having sent his adherents ahead, Muhammad secretly followed with Abu Bakr b. Quhafa, leaving _Ali b. _Abi Talib in his (Muhammad’s) bed, to deceive the Meccans who sought to kill him. On the way they stopped at a cave on Mount Thaur, where a spider’s web, spun across the entrance, fooled the Meccans into not looking within (Q. 9:40). Here, according to Sufi tradition, the Prophet taught Abu Bakr the secrets of silent remembrance, dhikr-e khafi,which earned Abu Bakr the title Yar-e ghar, friend of the cave.
Hijra has also been interpreted to mean “the breaking of old ties,” cutting off the era of knowledge from the previous era of ignorance (jahiliyya). The caliph _Umar b. al Khattab, establishing an Islamic calendar, chose this event as its starting point. Muhammad reached Medina in September 622. The calendar opens wih the first month of the Arabic lunar year in June 622 and proceeds without intercalation for a 354- day year in keeping with the lunar months. Hijra is based on the root h-j-r, the root of the name Hagar, the concubine of Abraham; the term Mahagraye was used by Christian sources to describe the Arab-Muslims, the descendants of Hagar. Muhajirun is the Arabic term given to those who emigrated from Mecca with the Prophet.