According to the Qur’an and hadith, to flee from Jihad is a Greater Sin. It is the twenty-seventh sin. The following verse of Surah Anfāl is clear. It concerns running away from a confrontation with unbelievers when they are less than twice the number of Muslims.
“O you who believe! When you meet those who disbelieve marching for war, then turn not your backs to them. And whoever shall turn his back to them on that day- unless he turn aside for the sake of fighting or withdraws to a company then he, indeed, becomes deserving of Allah’s wrath and his abode is hell; and an evil destination shall it be.”
(Surah Anfāl 8:15-16)
Hazrat Amir ul-Mu’minīn ‘Ali (a.s.) says:
“Those who flee from the battlefield should know that they have angered their Lord and have damned themselves to destruction because fleeing from the battle causes Allah’s anger. And one who flees from the Holy war will be certain to face calamities and eternal degradation and his fleeing will not prevent death, and his life cannot be prolonged. That is, if the time of his death has arrived, his fleeing will not delay it. He will die due to some other reason. On the other hand, if the time of his death has not yet arrived and he participates in Jihad he will not die. Thus it is better for one to pledge his life to Allah rather than live in Allah’s anger, degradation and dishonour.”
Initiated Jihad and Jihad in defence
Jihad is of two types:
(1) Initiated Jihad
(2) Jihad in defence
The first kind is that when the Muslims undertake a war against the unbelievers to invite them to Islam or for establishing justice. However, the permission of the Holy Prophet (S), the Holy Imams (a.s.) or their special representatives is a necessary prerequisite of this type of Jihad. Since the present period is of Major occultation this type of Jihad is forbidden.
Jihad in defence, as the name implies, pertains to circumstances when unbelievers attack Muslim territories or areas for obliterating Islamic heritage or for plundering the wealth and honour of Muslims. Under such conditions it is Wajib al-Kifai to undertake Jihad and repel their attack. For this type of Jihad the express permission of the Imam (a.s.) or his special deputy is not necessary.
There is a difference of opinion regarding flight from the battlefield. Some scholars are of the opinion that it pertains only to those wars that have been waged against the unbelievers under the order of the Holy Imam (a.s.) or his special deputy. (For example, exemption from Ghusl and Shroud to the martyr also pertains to this Jihad). Other doctors of religion maintain that the decree applies to both the kinds of Jihad. Those who wish to study this problem in detail can refer to the books of Jihad or the books of jurisprudence.
While discussing the prohibition of flight it would be most appropriate to discuss the steadfastness of Amir ul-Mu’minīn ‘Ali (a.s.) on the battlefield. Such incidents have been included in discussions extolling the merits of ‘Ali (a.s.). Neither the Shia nor the Sunni historical books mention even a single instance when ‘Ali (a.s.) turned his back to a battle. Even in the battle of Ohud he was the only one who did not flee. In the ninth volume of Bihār al-Anwār, under the chapter of “Bravery” a narration has been recorded from Ibn Masud, concerning ‘Ali (a.s.). Four of those who had run away from the battle of Ohud returned and again came to the Holy Prophet (S). They were Abu Dajana, Miqdad, Talha and Musayb. After this the rest of the Ansar came back. Thus it were these people who had deserted the Holy Prophet (S). All the companions had left the Holy Prophet (S) alone on the battlefield except ‘Ali (a.s.). ‘Ali (a.s.) was fighting in the midst of the polytheists to defend Islam and the Prophet of Islam (S).
During the battle of Ahzāb, the Holy Prophet (S) bestowed ‘Ali (a.s.) with the titles of “The vicious attacker” and “the non-receeder.” That is, the one who attacks the enemies with vengeance and does not recede an inch. There is no doubt that ‘Ali (a.s.) was imbued with all these qualities. Whereas, history is a witness that other companions like Abu Bakr, Umar and Uthman had fled from numerous battlefields like Ohud, Khaibar, Hunain and Dhat-Salāsil. Ibn Abil al-Hadid the Mutazalite has penned the following couplet in his famous book:
“It is not surprising that Abu Bakr fled from Hunain. He had also deserted the battle in Khaibar and Ohud.”
 Wajib al-Kifai means that if some person undertakes to fulfill an obligation, others need not.