Sahih Muslim 2218 b
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
الطَّاعُونُ آيَةُ الرِّجْزِ ابْتَلَى اللَّهُ عَزَّ وَجَلَّ بِهِ نَاسًا مِنْ عِبَادِهِ فَإِذَا سَمِعْتُمْ بِهِ فَلاَ تَدْخُلُوا عَلَيْهِ وَإِذَا وَقَعَ بِأَرْضٍ وَأَنْتُمْ بِهَا فَلاَ تَفِرُّوا مِنْهُ "
Usama b. Zaid reported that Allah's Messenger (ﷺ) had said:
Plague is the sign of a calamity with which Allah, the Exalted and Glorious, affects people from His servants. So when you hear about it, don't enter there (where it has broken out), and when it has broken out in a land and you are there, then don't run away from it.
Full reference and source
Sahih Muslim 2218 b In-book : Book 39, Hadith 125 USC-MSA web (English) : Book 26, Hadith 5494 (deprecated)
View source on Sunnah.com (opens in a new tab)