Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Were it not for the migration, I would have been a man from the Ansar. If the people took one valley and the Ansar took another valley or mountain pass, I would take the valley of the Ansar or the mountain pass of the Ansar."

Bukhari 7244

Sahih

حدثنا أبو اليمان أخبرنا شعيب حدثنا أبو الزناد عن الأعرج

عن أبي هريرة قال

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

البخاري 7244صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Wishing
Chapter
What is permissible of saying "if only"
Numbering
Darussalam 7244
Bukhari 7244