It is narrated from Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him) that he said: "I heard the Messenger of Allah (peace and blessings be upon him) saying: 'Were it not for (the virtue of) the Hijrah, I would have been one of the Ansar; and if the people were to take the way of a valley or a mountain pass, I would choose (the valley of) the Ansar.'"
Hadith Takhrij«حکم الحدیث فضائل الصحابہ محققاً تنسیق وصي الله بن محمد عباس - مکتبہ شاملہ :قال وصي الله عباس: إسناده حسن . . » «أخرجه صحيح البخاري برقم: 6817، وأخرجه مسند أحمد برقم: 9100، 9717، 10131، وأخرجه فتح الباري برقم: 17، وأخرجه المعجم الأوسط للطبراني برقم: 3857، وأخرجه صحيح ابن حبان برقم: 7269، وأخرجه مسند الإمام الشافعي برقم: 1784» «سنن الترمذي: 711/5؛ مسند الامام احمد: 138/3ـ137»