كتاب الحج
15  
The Book of Pilgrimage
(90)
Chapter: Encouraging people to stay in Al-Madinah when the regions were conquered
(90)
باب التَّرْغِيبِ فِي الْمَدِينَةِ عِنْدَ فَتْحِ الأَمْصَارِ ‏‏
Sahih Muslim 1388 a

Sufyan b. Abd Zuhair reported Allah's Messenger (ﷺ) as saying:

Syria will be conquered and some people will go out of Medina along with their families driving their camels. and Medina is better for them if they were to know it. Then Yemen will be conquered and some people will go out of Medina along with their families driving their camels, and Medina is better for them if they were to know it. Then Iraq will be conquered and some people will go out of it along with their families driving their camels, and Medina is better for them if they were to know it.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا وَكِيعٌ، عَنْ هِشَامِ بْنِ عُرْوَةَ، عَنْ أَبِيهِ، عَنْ عَبْدِ اللَّهِ بْنِ الزُّبَيْرِ، عَنْ سُفْيَانَ بْنِ أَبِي زُهَيْرٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ يُفْتَحُ الشَّامُ فَيَخْرُجُ مِنَ الْمَدِينَةِ قَوْمٌ بِأَهْلِيهِمْ يَبُسُّونَ وَالْمَدِينَةُ خَيْرٌ لَهُمْ لَوْ كَانُوا يَعْلَمُونَ ثُمَّ يُفْتَحُ الْيَمَنُ فَيَخْرُجُ مِنَ الْمَدِينَةِ قَوْمٌ بِأَهْلِيهِمْ يَبُسُّونَ وَالْمَدِينَةُ خَيْرٌ لَهُمْ لَوْ كَانُوا يَعْلَمُونَ ثُمَّ يُفْتَحُ الْعِرَاقُ فَيَخْرُجُ مِنَ الْمَدِينَةِ قَوْمٌ بِأَهْلِيهِمْ يَبُسُّونَ وَالْمَدِينَةُ خَيْرٌ لَهُمْ لَوْ كَانُوا يَعْلَمُونَ ‏"‏ ‏.‏
Reference : Sahih Muslim 1388a
In-book reference : Book 15, Hadith 568
USC-MSA web (English) reference : Book 7, Hadith 3200
  (deprecated numbering scheme)