Sayyiduna Usamah bin Zayd (may Allah be pleased with them both) said: The plague was mentioned in the presence of the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) said: "It is a punishment that befell those before you - or a torment that befell those before you. So when you hear of it in a town, do not enter it; and when it breaks out in a town where you are present, do not leave it fleeing from it."
Hadith Referenceالمعجم الكبير للطبراني / العشرة / 273