Sayyiduna Fudayk (may Allah be pleased with him) came to the Prophet (peace and blessings be upon him) and said: O Messenger of Allah! Some people claim that whoever did not emigrate is ruined. So the Messenger of Allah (peace and blessings be upon him) said: "O Fudayk! Establish the prayer, pay the zakah and abandon evil, then live in the land of your people wherever you wish." The narrator says: I think that he (peace and blessings be upon him) said: "When you become one who does these things, you will be an emigrant."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17773