Sahih al-Bukhari, Hadith 6973

Narrated `Abdullah bin 'Amir bin Rabi`a: `Umar bin Al-Khattab left for Sham, and when he reached a placed called Sargh, he came to know that there was an outbreak of an epidemic (of plague) in Sham. Then `AbdurRahman bin `Auf told him that Allah's Messenger said, "If you hear the news of an outbreak of an epidemic (plague) in a certain place, do not enter that place: and if the epidemic falls in a place while you are present in it, do not leave that place to escape from the epidemic." So `Umar returned from Sargh.

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مَسْلَمَةَ، عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَامِرِ بْنِ رَبِيعَةَ، أَنَّ عُمَرَ بْنَ الْخَطَّابِ ـ رضى الله عنه ـ خَرَجَ إِلَى الشَّأْمِ، فَلَمَّا جَاءَ بِسَرْغَ بَلَغَهُ أَنَّ الْوَبَاءَ وَقَعَ بِالشَّأْمِ فَأَخْبَرَهُ عَبْدُ الرَّحْمَنِ بْنُ عَوْفٍ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا سَمِعْتُمْ بِأَرْضٍ فَلاَ تَقْدَمُوا عَلَيْهِ، وَإِذَا وَقَعَ بِأَرْضٍ وَأَنْتُمْ بِهَا فَلاَ تَخْرُجُوا فِرَارًا مِنْهُ ‏" ‏‏.‏ فَرَجَعَ عُمَرُ مِنْ سَرْغَ‏.‏ وَعَنِ ابْنِ شِهَابٍ عَنْ سَالِمِ بْنِ عَبْدِ اللَّهِ أَنَّ عُمَرَ إِنَّمَا انْصَرَفَ مِنْ حَدِيثِ عَبْدِ الرَّحْمَنِ‏.‏

sunnah.com