He relocated from Mecca to the city of Medina
Mohammad's departure from Mecca (going to Medina) in the year 622 is known as the hijira. Hijira (also spelled "hijrah" or "hegira" in some variations of spelling in English) means an "exodus" or migration or movement. Mohammad was warned of a plot in Mecca to assassinate him, by Mecca merchants who opposed him. In Medina, Mohammad consolidated his following as the start of the Islamic movement, and returned to Mecca in 629 to conquer that city and prove that Allah was superior to the supposed gods of Mecca.