Allah, the Blessed and Exalted, says: "O you who believe! When you meet those who disbelieve face to face on the battlefield, do not turn your backs to them." [Surah al-Anfal: 15] (to the end of the verse)
And He said: "O Prophet! Urge the believers to fight." [Surah al-Anfal: 65] to the end of the two verses.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / Q18077
Sayyiduna Abu Hurayrah (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Avoid the seven destructive things." They said: O Messenger of Allah, what are they? He (peace and blessings be upon him) mentioned them, and one of them is "fleeing on the day of battle."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18077
It is narrated from Sayyiduna Abdullah bin Abi Awfa (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Do not wish to meet the enemy; rather, ask Allah for well-being. But when you do meet the enemy, be steadfast, and know that Paradise is beneath the shade of swords."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18078
Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: When this verse was revealed: "If there are twenty among you who are steadfast, they will overcome two hundred." [Surah al-Anfal: 65] it was made obligatory that twenty should not flee from facing two hundred. Then Allah revealed this verse: "Now Allah has lightened your burden, and He knows that there is weakness in you. So if there are a hundred of you, they will overcome two hundred." [Surah al-Anfal: 66] That is, a hundred should not flee from facing two hundred.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18079
Ikrimah narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that when this verse was revealed: "If there are twenty among you who are steadfast, they will overcome two hundred." [Surah al-Anfal: 65] he said: It was made obligatory upon them that one man should not flee from facing ten, nor a group from facing ten times their number. This was hard on the people, so this verse was revealed: "Now Allah has lightened your burden, and He knows that there is weakness in you. So if there are a hundred of you, they will overcome two hundred." [Surah al-Anfal: 66] The narrator said: (They were then ordered) that one man should not flee from facing two, nor a group from facing twice their number.
Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: Patience was reduced by as much as the number was lightened.
(b) In the narration of Abdullah bin al-Mubarak (may Allah have mercy on him): It was hard on the Muslims when it was laid down that one should not flee from facing ten, so the command of lightening came. He said: "Now Allah has lightened your burden." [Surah al-Anfal: 66] So when Allah lightened the number for them, patience was reduced in proportion to what He had lightened for them.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18080
Ata narrates from Abdullah bin Abbas (may Allah be pleased with them both) that if a man flees from two, he is called one who has fled; but if someone flees from facing three, he is not counted among those who flee.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18081