Allah says, 'And (O Prophet,) when you are present among them and lead them in prayer, then (the rule when dealing with the enemy is that) a group of Muslims will stand with you and keep their weapons. Then when they prostrate, they will go behind you and the other party, who have not prayed yet, will come forward and they will pray with you. They will also keep their self-defense equipment and weapons with them.' (Surah Nisa, verse: 102)
Even in difficult situations like war, Allah has urged us to pray with the congregation. The Holy Prophet (S.A.W.) warned against neglecting to pray in congregation and said, 'Whoever hears the call to prayer and does not attend congregation despite having no disability, his prayer will not be performed.' (Ibn Majah: 793)
