What is the prayer of fear in islam? How to perform of the prayer of fear? What is the prayer of overcoming fear? How is salatul khauf performed?
According to Abu Ḥanīfa and Imam Muhammad, it is permissible to perform the prayer of fear in times of fear such as an enemy attack or flood. According to Abu Yusuf, this prayer was specific to the time of the Prophet.
The following is stated in the Qur’an: “When you (O Messenger) are with them and stand to lead them in prayer, Let one party of them stand up (in prayer) with you, Taking their arms with them: When they finish their prostrations, let them take their position in the rear. And let the other party come up which hath not yet prayed – and let them pray with you, taking all precaution, and bearing arms: the unbelievers wish, if you were negligent of your arms and your baggage, to assault you in a single rush. But there is no blame on you if you put away your arms because of the inconvenience of rain or because you are ill, but take (every) precaution for yourselves. For the unbelievers, Allah has prepared a humiliating punishment.”
It is reported that the Prophet led the prayer of fear in four places. These are the events of “Dhātu’r-Riqā”, “Baṭn al-Naḥla”, “Usfān” and “Dhūqarad”. After the Prophet, Ali, Abu Musa al-Ash’arī and Hudhayfa (r. anhum) also led the fear prayer.
According to Ibn Rushd, there are seven different ways of performing this prayer due to the variations in the reports about it. According to the Ḥanafis, the way of performing the fear prayer is as follows: A group of people who are in a state of war stand against the enemy, and another group comes and follows the imam; the group that comes to perform the prayer performs the first cycle of a two-cycle prayer and the first two-cycle of a three- or four-cycle prayer together with the imam; After the second prostration or tashahhud in the first sitting, this group goes to the enemy front, the other group comes and follows the imam. The second group performs the remaining cycles with him and goes to face the enemy again. The imam offers the greetings by himself and leaves the ritual prayer. The first group returns and completes their ritual prayer without recitation, salutes, and goes back to the enemy front for this group is in the position of “lāḥiq”. Then the second group comes, completes their prayers with recitation, and returns to their positions on the enemy front because they are in the state of “masbūk”. If there is difficulty in coming and going, these people can also complete their prayers wherever they are situated.
Performing the prayer in the congregation in this way is to enable them to pray behind a respected and virtuous imam. Otherwise, it is more virtuous for each group to perform their prayers behind different imams as in normal times.
For the prayer of fear to be valid, these groups who follow the imam must not be fighting with the enemy during the prayer, must not be riding an animal, or change their position, in short, they must not do anything that conflicts with the ritual prayer. Otherwise, their ritual prayer with the imam is considered invalid.
When the intensity of the war increases, if the soldiers cannot get down from their mounts, they should perform their prayers with gestures on their mounts towards the direction they can turn. If this is not possible, they should postpone their ritual prayers. As a matter of fact, the noon, late afternoon, and evening prayers in the “The Battle of Trench” were postponed and made up later.
According to the majority, other than the Ḥanafis, it is permissible to perform the ritual prayer with gestures, even in sword warfare, when the battle is most heated.
 Al-Nisā, 4: 102.
 For more information see Ibn al-Humām, ibid, I, 441; al-Maydanī, ibid, I, 124; Ibn Abidīn, I, 792; Ibn Rushd (Averroes), Bidāyat al-Mujtahid, I, 327; al-Zuhaylī, ibid, II, 431 ff.
Source: Basic Islamic Principles (ilmiḥal) According to the Four Sunni Schools With Evidence From The Sources of Islamic Law, Prof. Hamdi Döndüren, Erkam Publications