Usama bin Zayd reported,

The Messenger of Allah ﷺ mentioned the plague and said, "It is a punishment or torment with which some nations were afflicted. A remnant of it has remained, departing at one time and returning at another. Whoever hears of it in a land should not travel to it, and whoever is in a land where it has broken out should not leave fleeing from it."

Bukhari 6974

Sahih

حدثنا أبو اليمان حدثنا شعيب عن الزهري حدثنا عامر بن سعد بن أبي وقاص أنه

سمع أسامة بن زيد يحدث سعدا

أن رسول الله ﷺ ذكر الوجع فقال رجز أو عذاب عذب به بعض الأمم ثم بقي منه بقية فيذهب المرة ويأتي الأخرى فمن سمع به بأرض فلا يقدمن عليه ومن كان بأرض وقع بها فلا يخرج فرارا منه

البخاري 6974صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Trickery
Chapter
What is disliked of scheming to flee from the plague
Numbering
Darussalam 6974
Bukhari 6974