Ata (may Allah have mercy on him) says: I met Sayyidah Aishah (may Allah be pleased with her) together with Ubayd bin Umayr, and he asked her about emigration. She said: There is no emigration today; emigration used to be to Allah and His Messenger. When the believers were put to trial regarding their religion, they would come to the Noble Messenger (peace and blessings be upon him) to save their religion. Now Allah Almighty has spread Islam so widely that a man can worship his Lord wherever he wishes. Now "jihad and intention remain".
All these hadiths refer to the ending of the obligation of emigration for the people of Makkah, or for other towns besides it which have become the abode of Islam or the abode of safety. But if a man is in the abode of war and it is difficult for him to practise Islam there, then emigration remains for him: he should emigrate from there to the abode of Islam and save his religion.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17777