Abdullah bin Abbas reported,

The Messenger of Allah ﷺ, Abu Bakr, and Umar were among the Muhajirun because they migrated away from the polytheists. Some of the Ansar were also Muhajirun, because Medina had been a land of polytheism, and they came to the Messenger of Allah ﷺ on the night of al-Aqaba.

Nasai 4171

Hasan

أخبرنا الحسين بن منصور قال حدثنا مبشر بن عبد الله قال حدثنا سفيان بن حسين عن يعلى بن مسلم عن جابر بن زيد قال

قال ابن عباس

إن رسول الله ﷺ وأبا بكر وعمر كانوا من المهاجرين لأنهم هجروا المشركين وكان من الأنصار مهاجرون لأن المدينة كانت دار شرك فجاءوا إلى رسول الله ﷺ ليلة العقبة

النسائي 4171حسن
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Pledge of allegiance
Chapter
Tafsir of hijrah
Numbering
Darussalam 4171
Nasai 4171