Accordingly, the congregational prayer is an individual obligation upon men—whether they are at home or on a journey, in times of security or in times of fear. This ruling is established by the Qur’an, the Sunnah, and the uninterrupted practice of the Muslim community, generation after generation.
For that very reason the mosques were built, imams and mu’adhdhins were appointed for them, and the loud call was legislated: “Ḥayya ʿala al-ṣalāh, ḥayya ʿala al-falāḥ” (“Come to prayer, come to success”).
Concerning the state of fear, Allah the Exalted says: “When you are among them and lead them in prayer, let a group of them stand with you…” (Q 4:102). This noble verse underscores how emphatically the congregational prayer is enjoined, for the Muslims were not given a concession to abandon it even in fear. Had it not been obligatory, fear would have been the foremost excuse to waive it. Indeed, in the prayer of fear many of the usual obligations of prayer are set aside; were the communal obligation not so pressing, those numerous duties would never have been waived on its account.
In the hadith agreed upon by al-Bukhārī and Muslim, Abu Hurayrah—may Allah be pleased with him—reported that the Prophet (peace and blessings be upon him) said: “The heaviest prayers upon the hypocrites are the ʿIshāʾ (night) prayer and the Fajr (dawn) prayer. If they knew the reward that lies in them, they would come even if they had to crawl. I was on the verge of ordering that the prayer be established, then appointing a man to lead the people, after which I would go with some men carrying bundles of firewood to those who do not attend the prayer and burn their houses down upon them.”