It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him), Sayyiduna Abu Bakr, Sayyiduna Umar and the other Companions of the Messenger of Allah (peace and blessings be upon him) (may Allah be pleased with them) were Muhajirun, because they had left the polytheists; and among the Ansar too there were some Muhajirun, because Madinah was a place where (people) came and settled; so they came to the Messenger of Allah (peace and blessings be upon him) on the Night of al-Aqabah.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12763