Prayer of Fear: Salat al-Khawf and How It Is Prayed
The prayer prayed when facing an enemy, in which the congregation divides into two groups, one praying with the imam while the other keeps watch.
Allah says in Surah an-Nisa:
وَإِذَا كُنتَ فِيهِمْ فَأَقَمْتَ لَهُمُ ٱلصَّلَوٰةَ فَلْتَقُمْ طَآئِفَةٌ مِّنْهُم مَّعَكَ وَلْيَأْخُذُوٓا۟ أَسْلِحَتَهُمْ فَإِذَا سَجَدُوا۟ فَلْيَكُونُوا۟ مِن وَرَآئِكُمْ وَلْتَأْتِ طَآئِفَةٌ أُخْرَىٰ لَمْ يُصَلُّوا۟ فَلْيُصَلُّوا۟ مَعَكَ وَلْيَأْخُذُوا۟ حِذْرَهُمْ وَأَسْلِحَتَهُمْ ۗ وَدَّ ٱلَّذِينَ كَفَرُوا۟ لَوْ تَغْفُلُونَ عَنْ أَسْلِحَتِكُمْ وَأَمْتِعَتِكُمْ فَيَمِيلُونَ عَلَيْكُم مَّيْلَةً وَٰحِدَةً ۚ وَلَا جُنَاحَ عَلَيْكُمْ إِن كَانَ بِكُمْ أَذًى مِّن مَّطَرٍ أَوْ كُنتُم مَّرْضَىٰٓ أَن تَضَعُوٓا۟ أَسْلِحَتَكُمْ ۖ وَخُذُوا۟ حِذْرَكُمْ ۗ إِنَّ ٱللَّهَ أَعَدَّ لِلْكَـٰفِرِينَ عَذَابًا مُّهِينًا
When you are with them and you stand to lead them in prayer, let one party of them stand with you, armed. When these have made their prostration, they should move behind you, and the other party, which has not yet prayed, should come and pray with you, keeping guard and holding their arms. Those who reject the truth would love you to be careless of your arms and your belongings, so that they could fall on you in one rush. It is no sin for you to lay your arms aside if rain is troubling you or you are sick, but keep on guard. Allah has prepared a shameful punishment for the unbelievers.
How the prayer is prayed
Abdullah ibn Umar described the prayer of the Prophet (peace be upon him) in fear: "I went on an expedition with the Messenger of Allah towards Najd. We met the enemy and lined up facing them. The Messenger of Allah stood to lead us in prayer, and one group stood with him praying while another faced the enemy. The Messenger of Allah bowed with those who were with him and made two prostrations. Then they left and took the place of the group who had not prayed, and those came, and he bowed with them one rak'ah and made two prostrations and then gave the salam. Then each of them stood, bowed one rak'ah by himself and made two prostrations" (Sahih al-Bukhari 942).
The verse describes something close to this: one group stands with the imam and takes its weapons, and when it has finished prostrating it goes to the rear, and another group that has not prayed comes and prays with him.
Number of rak'ahs
Ibn Abbas said: "Allah made the prayer obligatory on the tongue of your Prophet as four at home, two on a journey and one in fear" (Sahih Muslim 687). The description of Ibn Umar has one rak'ah for each group with the imam, then each person completes his second rak'ah. Several descriptions of the prayer of fear are reported in the narrations.
When it is prayed
The verse speaks of meeting the enemy in a campaign, and the hadith of Ibn Umar is about an expedition towards Najd, so the situation in the texts is meeting an enemy.
Questions about the prayer of fear
What is the prayer of fear?
The prayer prayed on meeting the enemy, in which the congregation splits into two groups, one praying with the imam and the other guarding, as in the hadith of Ibn Umar.
How many rak'ahs is the prayer of fear?
In the hadith of Ibn Abbas, one, and in the description of Ibn Umar, one with the imam for each group and then another rak'ah that each person completes.
May weapons be carried in prayer?
The verse orders the praying group to take its weapons, so it is commanded in this case.