Ikrimah bin Khalid al-Makhzumi relates from his father or his paternal uncle, from his grandfather, that during the expedition of Tabuk the Messenger of Allah (peace and blessings be upon him) said: "When plague breaks out in a land while you are in it, do not leave it; and if you are elsewhere, do not go to it."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15113