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." (Using translation from Tirmidhī 1065)
أَنَّ النَّبِيَّ ﷺ ذَكَرَ الطَّاعُونَ فَقَالَ «بَقِيَّةُ رِجْزٍ وَعَذَابٍ أُرْسِلَ عَلَى طَائِفَةٍ مِنْ بَنِي إِسْرَائِيلَ فَإِذَا وَقَعَ بِأَرْضٍ وَأَنْتُمْ بِهَا فَلَا تَخْرُجُوا مِنْهَا وَإِذَا وَقَعَ بِأَرْضٍ وَلَسْتُمْ بِهَا فَلَا تَهْبِطُوا عَلَيْهَا»