Sufyan bin Abu Zuhayr reported,

The Messenger of Allah ﷺ said, "Sham will be conquered, and a group of people will leave Medina with their families, urging their mounts on, though Medina would be better for them, if only they knew. Then Yemen will be conquered, and a group of people will leave Medina with their families, urging their mounts on, though Medina would be better for them, if only they knew. Then Iraq will be conquered, and a group of people will leave Medina with their families, urging their mounts on, though Medina would be better for them, if only they knew."

Muslim 3364

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا وكيع عن هشام بن عروة عن أبيه عن عبد الله بن الزبير

عن سفيان بن أبي زهير قال

قال رسول الله ﷺ تفتح الشام فيخرج من المدينة قوم بأهليهم يبسون والمدينة خير لهم لو كانوا يعلمون ثم تفتح اليمن فيخرج من المدينة قوم بأهليهم يبسون والمدينة خير لهم لو كانوا يعلمون ثم تفتح العراق فيخرج من المدينة قوم بأهليهم يبسون والمدينة خير لهم لو كانوا يعلمون

مسلم 3364صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Hajj
Chapter
Encouragement to stay in Madinah when the cities are conquered
Numbering
Darussalam 3364
Muslim 3364