Sahih Muslim Book 7, Hadith Number 3201.

Chapter : Exhortation to stay in Medina when the towns will be conquered.

Sufyan b. Abu Zuhair heard Allah’s Messenger (may peace be upon him) say: Yemen will be conquered and some people will go away (to that country) driving their camels and carrying their families on them and those who are under their authority, while Medina is better for them if they were to know it. Then Syria will be conquered and some people will go away driving their camels along with them and carrying their families with them and those who are under their authority, while Medina is better for them if they were to know it. Then Iraq will be conquered and some people will go away (to that country) driving their camels and carrying their families with them and those who are under their authority, while Medina is better for them if they were to know it.