Sahih al-Bukhari, Book 76, Hadith 43 (Bukhari 5506)

Narrated Saud:

The Prophet (ﷺ) said, "If you hear of an outbreak of plague in a land, do not enter it; but if the plague breaks out in a place while you are in it, do not leave that place."