It is narrated from Sayyiduna Usamah bin Zayd (may Allah be pleased with them both) that he said: The Messenger of Allah (peace and blessings be upon him) said: "This epidemic is a punishment with which Allah destroyed some nations, and a part of it has remained in the earth, which sometimes comes and sometimes goes. So when it breaks out in a land where you are present, do not leave it; and when you hear of it in a land, do not go there."
Hadith Referenceالمعجم الكبير للطبراني / العشرة / 271