Praise be to Allah.
Praying in congregation
Prayer in congregation is obligatory for healthy men in the mosque, according to the more correct scholarly opinion. This is based on a great deal of evidence, including the following:
- Allah says (interpretation of the meaning):
“When you (O Messenger Muhammad) are among them, and lead them in As-Salah (the prayer), let one party of them stand up [in Salah (prayer)] with you taking their arms with them; when they finish their prostrations, let them take their positions in the rear and let the other party come up which have not yet prayed, and let them pray with you” [al-Nisa 4:102]
The following points are made on the basis of this verse:
Allah commands them to pray in congregation, then He repeats this command a second time with regard to the second party or group, as He says, “and let the other party come up which have not yet prayed, and let them pray with you”. This indicates that prayer in congregation is an obligation for all individuals, because Allah did not absolve the second group of this obligation as a result of the first group praying in congregation.
If prayer in congregation was Sunnah, it would be more appropriate for people to be excused from it at times of fear [the situation referred to in this verse], and if it were fard kifayah (a communal obligation), it would be discharged by the actions of the first group. So this verse shows that it is an individual obligation, and demonstrates that in three ways: it is enjoined at the beginning, then it is enjoined a second time, and there is no concession allowing them not to do it at times of fear. (From the words of Ibn al-Qayyim in Kitab al-Salah)
- In al-Sahihayn (the following version was narrated by al-Bukhari) it is narrated from Abu Hurayrah that the Messenger of Allah (peace and blessings of Allah be upon him) said: “By the One in Whose Hand is my soul, I had thought of ordering that wood be gathered, then I would command the call to prayer to be given, and I would appoint a man to lead the people in prayer, then I would go to men [who do not attend the congregational prayer] and burn their houses down around them. By the One in Whose Hand is my soul, if any of you had known that he would receive a bone covered with meat or two (small) pieces of meat in a sheep’s foot, he would come for 'Isha prayer.” (Al-Bukhari, 7224; Muslim, 651)
Ibn al-Mundhir (may Allah have mercy on him) said: “The fact that he was thinking of burning down the houses of people who did not attend the prayer is the clearest evidence that attending prayer in congregation is obligatory, because it would not be permissible for the Prophet (peace and blessings of Allah be upon him) to do this with regard to something that was mustahabb and not obligatory.” (Al-Awsat, 4/134)
For more information on the evidence, please see question no. 8918 .
Congregational prayer in the mosque
Once it is established that prayer in congregation is obligatory, it is obligatory to perform this prayer in the mosque. It is not permissible for a man who is able to attend the congregational prayer in the mosque to pray in his house even if he prays in congregation with his family.
Shaykh Ibn Baz said:
“With regard to not praying in congregation, this is a reprehensible action and is not permitted. It is also one of the attributes of the hypocrites.
It is obligatory for the Muslim to pray in the mosque in congregation, as it says in the hadith of Ibn Umm Makhtum – who was a blind man. He said, “O Messenger of Allah, I do not have a guide to lead me to the mosque,” and he asked the Messenger of Allah (peace and blessings of Allah be upon him) to grant him a concession allowing him to pray in his house, and he allowed him that, but when he turned away he called him back and asked, “Can you hear the call to prayer?” He said, “Yes.” He said, “Then answer it.” Narrated by Muslim in his Sahih, 635.
And it was narrated that the Prophet (peace and blessings of Allah be upon him) said: “Whoever hears the call to prayer and does not come, there is no prayer for him [i.e., his prayer is not valid], unless he has an excuse.” Narrated by Ibn Majah, al-Daraqutni, Ibn Hibban and al-Hakim with a sahih isnad. It was said to Ibn 'Abbas, what is an excuse? He said, Fear or sickness.
In Sahih Muslim (654) it is narrated that Ibn Mas’ud said: “At the time of the Messenger of Allah (peace and blessings of Allah be upon him) we used to think that no one failed to attend the prayer in congregation but a hypocrite or one who was sick.”
What is meant is that the believer is required to pray in the mosque, and it is not permissible for him to take the matter lightly and pray in his house when the mosque is nearby.
The fact that only two men pray in the mosque reinforces the fact that you have to attend the congregational prayer, so as to be free of any sin or shortcoming, and so as to encourage them to attend the prayer in congregation in the mosque, so that they will not get lazy. Two or more people constitutes a congregation.
Ibn Hubayrah (may Allah have mercy on him) said: “[The scholars] were unanimously agreed that the smallest number that counts for prayer in congregation, apart from Jumu’ah prayer, is two: the imam and the person who is praying behind him, who should stand to his right.” (Al-Ifsah, 1/155)
Ibn Qudamah (may Allah have mercy on him) said: “A congregation may consist of two or more , and we know of no difference of opinion concerning that.”
For more, please see this category: Congregational Prayer
And Allah knows best.