When you meet those who disbelieve And whoever turns his back to them on such a day -- unless it be a stratagem of war, or to retreat to a troop (of his own) -- he indeed has drawn upon himself wrath from Allah. And his abode is Hell, and worst indeed is that destination! (Surah Al-Anfal 8: 16)
(Surah Al-Anfal 8: 15-16)
Fleeing from Battle is prohibited, and its Punishment
Allah said, while warning against fleeing from the battlefield and threatening those who do it with the Fire, O you who believe! When you meet those who disbelieve, in a battlefield,
when you get near the enemy and march towards them, never turn your backs to them
do not run away from battle and leave your fellow Muslims behind, And whoever turns his back to them on such a day -- unless it be a stratagem of war...
The Ayah says, whoever flees from the enemy by way of planning to pretend that he is afraid of the enemy, so that they follow him and he takes the chance and returns to kill the enemy, then there is no sin on him. This is the explanation of Sa`id bin Jubayr and As-Suddi. Ad-Dahhak also commented, "Whoever went ahead of his fellow Muslims to investigate the strength of the enemy and make use of it, or to retreat to a troop (of his own),
meaning he leaves from here to another troop of Muslims to assist them or be assisted by them. So that is allowed for him, or even during the battle if he flees from his brigade to the commander. Or going to the grand Imam, would also fall under this permission.''
Umar bin Al-Khattab, (Radhi Allahu Anhu), said about Abu `Ubayd (Radhi Allahu Anhu) when he was fighting on the bridge in the land of the Persians, because of the many Zoroastrian soldiers, "If he retreated to me then I would be as a troop for him.''
This is how it was reported by Muhammad bin Sirin from `Umar (Radhi Allahu Anhu). In the report of Abu `Uthman An-Nahdi from `Umar, he said: When Abu `Ubayd was fighting, `Umar (Radhi Allahu Anhu) said, "O people! We are your troop.'' Mujahid said that `Umar said, "We are the troop of every Muslim.'' Abdul-Malik bin `Umayr reported from `Umar, "O people! Don't be confused over this Ayah, it was only about the day of Badr, and we are a troop for every Muslim.'' Ibn Abi Hatim [recorded] that Nafi` questioned Ibn `Umar (Radhi Allahu Anhuma), "We are people who are not stationary when fighting our enemy, and we may not know where our troop is, be it that of our Imam or our army.''
So he replied, "The troop is Allah's Messenger (Sallallahu Alayhi wa Sallam).'' I said but Allah said, when you meet those who disbelieve in the battlefield
to the end of the Ayah . So he said; "This Ayah was about Badr, not before it nor after it.''
Ad-Dahhak commented that Allah's statement, or to retreat to a troop,
refers to "Those who retreat to the Messenger of Allah (Sallallahu Alayhi wa Sallam) and his Companions (when the Messenger was alive), and those who retreat in the present time to his commander or companions.'' However, if one flees for any other reason than those mentioned here, then it is prohibited and considered a major sin. Al-Bukhari and Muslim recorded that Abu Hurayrah (Radhi Allahu Anhu) said that the Messenger of Allah (Sallallahu Alayhi wa Sallam) said, Shun the seven great destructive sins.''
The people inquired, "O Allah's Messenger! What are they'' He (Sallallahu Alayhi wa Sallam) said, (They are:) Joining others in worship with Allah, magic, taking life which Allah has forbidden, except for a just cause (according to Islamic law), consuming Riba, consuming an orphan's wealth, fleeing the battlefield at the time of fighting, and false accusation to chaste women, who never even think of anything touching chastity and are good believers.
This is why Allah said here, he indeed has drawn upon himself...,
and returned with, wrath from Allah. And his abode...,
destination, and dwelling place on the Day of Return, is Hell, and worst indeed is that destination! Source: Tafsir ibn Kathir (Abridged)