Ibn 'Abbas (May Allah be pleased with them) reported:
'Umar bin Al- Khattab (May Allah be pleased with him) set out for Ash-Sham (the region comprising Syria, Palestine, Lebanon and Jordan). As he reached at Sargh (a town by the side of Hijaz) he came across the governor of Al-Ajnad, Abu 'Ubaidah bin Al-Jarrah (May Allah be pleased with him) and his companions. They informed him that an had broken out in Syria. Ibn 'Abbas relates: 'Umar (May Allah be pleased with him) said to me: "Call to me the earliest Muhajirun (Emigrants)." So I called them. He sought their advice and told them that an epidemic had broken out in Ash-Sham. There was a difference of opinion whether they should proceed further or retreat to their homes in such a situation. Some of them said: "You have set forth to fight the enemy, and therefore you should not go back;" whereas some of them said: "As you have along with you many eminent Companions of Messenger of Allah (ﷺ), we would not advice you to set forth to the place of the plague (and thus expose them deliberately to a danger)." 'Umar (May Allah be pleased with him) said: "You can now go away." He said: "Call to me the Ansar (the Helpers)." So I called them to him, and he consulted them and they differed in their opinions as well. He said: "Now, you may go." He again said: "Call the old (wise people) of the Quraish who had emigrated before the conquest of Makkah." I called them. 'Umar (May Allah be pleased with him) consulted them in this issue and not even two persons among them differed in the opinions. They said: "We think that you should go back along with the people and do not take them to this scourge. 'Umar (May Allah be pleased with him) made an announcement to the people, saying: "In the morning I intend to go back, and I want you to do the same." Abu 'Ubaidah bin Al-Jarrah (May Allah be pleased with him) said: "Are you going to run away from the Divine Decree?" Thereupon 'Umar (May Allah be pleased with him) said: "O Abu 'Ubaidah ! Had it been someone else to say this." ('Umar (May Allah be pleased with him) did not like to differ with him). He said: "Yes, we are running from the Divine Decree to the Divine Decree. What do you think if you have camels and you happen to get down a valley having two sides, one of them covered with foliage and the other being barren, will you not act according to the Divine Decree if you graze them in vegetative land? In case you graze them in the barren land, even then you will be doing so according to the Divine Decree.There happened to come 'Abdur-Rahman bin 'Auf who had been absent for some of his needs. He said: I have knowledge about it. I heard the Messenger of Allah (ﷺ) saying, "If you get wind of the outbreak of plague in a land, you should not enter it; but if it spreads in the land where you are, you should not depart from it." Thereupon 'Umar bin Khattab (May Allah be pleased with him) praised Allah and went back.[Al-Bukhari and Muslim].
App reference: Book 18, Hadith 281
Arabic/English book reference: Book 18, Hadith 1791