The Prophet mentioned the plague and said: "It is an abiding punishment or chastisement that was sent upon a group of the children of Isra'il. So when it occurs in a land while you are in it, then do not leave it. And when it occurs in a land while you are not in it, then do not enter it."
Jami` at-Tirmidhi Book 10, Hadith 101