Amir bin Sa'd narrates from his father, Sayyiduna Sa'd bin Abi Waqqas (may Allah be pleased with him), who said: The Messenger of Allah (peace and blessings be upon him) said: "This epidemic is something with which the nations before you were punished, and a part of it has remained in the earth, which sometimes breaks out and sometimes goes away. So when it breaks out in a land where you are present, do not leave it; and when it breaks out in a land where you are not present, do not enter it."
Hadith Referenceالمعجم الكبير للطبراني / العشرة / 274