Muhammad and the Muslim flee to Medina

The Hijra (هِجْرَة) is the migration of the Islamic prophet Muhammad and his followers to the city of Medina in 622

In September 622, warned of a plot to assassinate him, Muhammad secretly slipped out of Mecca with Abu Bakr.[3] By degrees, Muhammad and his followers emigrated to the city of Yathrib, 320 kilometres (200 mi) north of Mecca. Yathrib was soon renamed Madinat un-Nabi, literally "the City of the Prophet", but un-Nabi was soon dropped, so its name in English is Medina, meaning "the city". The Muslim year during which the Hijra occurred was designated the first year of the Islamic calendar by Umar in 638 or 17 AH (anno hegirae = "in the year of the hijra").

In 622, Muhammad and his few hundred followers left Mecca and traveled to Yathrib, the oasis town where his father was buried. The leaders there were suffering through a civil war, and they had invited this man well known for his wisdom to act as their mediator. Yathrib soon became known as Medina, the City of the Prophet. Muhammad remained here for the next six years, building the first Muslim community and gradually gathering more and more people to his side.