(32) باب الطَّاعُونِ وَالطِّيَرَةِ وَالْكَهَانَةِ وَنَحْوِهَا
Usama reported Allah's Messenger (ﷺ) as saying:
Plague is a calamity which was inflicted on those who were before you, or upon Bani Isra'il. So when it has broken out in a land, don't run out of it, and when it has spread in a land, then don't enter it.
Reference: Sahih Muslim 2218 c
In-book reference: Book 39, Hadith 126
USC-MSA web (English) reference(deprecated numbering scheme): Book 26, Hadith 5495