I read some time ago that it is desirable to leave a Non-Muslim country as soon as the purpose for being there have been achieved. Is there a Hadith like this? I strongly believe in it as I have the experience and I feel it is almost mandatory, not only desirable. I have been trying to convince my friends of the strong reasons behind this but they do not understand. May be a Hadith might help.
Under normal circumstances, residing in a Muslim or a non-Muslim country is again not a matter of permissibility or otherwise (Halaal or Haraam). In other words it is not mandatory for a Muslim, under ALL circumstances, to leave his homeland, if it is ruled by non-Muslims. It is again a matter of preference. A Muslim, while making a choice regarding his homeland, must consider the socio-cultural environment and the ease with which he can live according to the commandments of his Lord. In any case, if someone thinks that he CAN live according to the commandments of God in the land of his preference, which is a non-Muslim country, Islam does not stop him from carrying out his option.
However, there is a certain special set of circumstances, where Islam makes it binding for a Muslim to leave his non-Muslim homeland. These circumstances particularly relate to conditions where a person is persecuted for being a Muslim and is stopped or hindered from carrying out the commands of his Lord, as was the case in Mekkah after the establishment of an Islamic state in Medinah. Thus, only under such circumstances it becomes binding for a Muslim to migrate to a Muslim country. Besides this situation, under normal circumstances, all that can and should be said is that it is preferable (if it really is) to live under a Muslim rule and in a society with Muslim values.