USC-MSA web (English) : Book 45, Hadith 24
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِذَا سَمِعْتُمْ بِهِ بِأَرْضٍ فَلاَ تَقْدَمُوا عَلَيْهِ وَإِذَا وَقَعَ بِأَرْضٍ وَأَنْتُمْ بِهَا فَلاَ تَخْرُجُوا فِرَارًا مِنْهُ "
Yahya related to me from Malik from Ibn Shihab from Abdullah ibn Amir ibn Rabia that Umar ibn al-Khattab went out to ash-Sham. When he came to Sargh, near Tabuk, he heard that the plague had broken out in ash-Sham. Abd ar-Rahman ibn Awf told him that the Messenger of Allah (ﷺ) said, "If you hear that a land has a plague in it, do not go forward to it. If it comes upon a land which you are in, do not depart in flight from it." Umar ibn al- Khattab came back from Sargh.
Full reference and source
USC-MSA web (English) : Book 45, Hadith 24 Arabic : Book 45, Hadith 1623
View source on Sunnah.com (opens in a new tab)