It was narrated that Jabir bin Zaid said:
Ibn 'Abbas said: 'The Messenger of Allah (ﷺ), Abu Bakr and 'Umar were among the Muhajirin (emigrants), because they forsook (hajaru) the idolators, and some of the Ansar were Muhajirun because Al-Madinah was a land of shirk, and they came to the Messenger of Allah (ﷺ) on the Night of Al-'Aqabah. '