That 'Abd al-Rahman b.'Awf said: I heard the Messenger of Allah ﷺ say: When you hear that it is breaking out in a certain territory, do not go there. If it breaks out in the territory you are in, do not go out fleeing away from it. By "it" he referred to the plague. (Using translation from Abū Dāʾūd 3103)
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ «إِذَا سَمِعْتُمْ بِهِ فِي أَرْضٍ فَلَا تَقْدَمُوا عَلَيْهِ وَإِذَا وَقَعَ بِأَرْضٍ وَأَنْتُمْ بِهَا فَلَا يُخْرِجَنَّكُمُ الْفِرَارُ مِنْهُ»