Yahya bin Sa'd narrates from his father, Sayyiduna Sa'd (may Allah be pleased with him), who 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. When it is in a land where you are present, do not leave it; and if it is already there, do not enter it."
Hadith Referenceالمعجم الكبير للطبراني / العشرة / 328