What is the distance within which it is obligatory to pray in the mosque?
Praise be to Allaah.
It is obligatory upon the one who hears the call to prayer given in a normal voice, without the use of loudspeakers, to respond and attend the prayer in congregation in the mosque from which the call is given, because the Prophet (peace and blessings of Allaah be upon him) said: "Whoever hears the call and does not come [to the mosque], there is no prayer for him, except for one who has an excuse." This was narrated by Ibn Maajah, al-Daaraqutni, Ibn Hibbaan and al-Haakim with a saheeh isnaad.
Ibn 'Abbaas (may Allaah be pleased with him) was asked what counts as an excuse. He said, "Fear or sickness." Muslim narrated in his Saheeh from Abu Hurayrah (may Allaah be pleased with him) that a blind man said, "O Messenger of Allaah, I do not have anyone to guide me to the mosque; may I have a dispensation to let me pray in my house?" The Prophet (peace and blessings of Allaah be upon him) said, "Can you hear the call to prayer?" He said, "Yes." He said, "Then respond."
In Saheeh Muslim it is narrated that Ibn Mas'ood (may Allaah be pleased with him) said: "Whoever wants to meet Allaah tomorrow as a Muslim, then let him pray these prayers regularly when the call for them is given, for Allaah has shown your Prophet the ways of guidance, and they are part of the ways of guidance. If you pray in your houses like this one who stayed at home, then you have forsaken the Sunnah of your Prophet, and if you forsake the Sunnah of your Prophet you will go astray. And at that time we saw no one stay behind except for a hypocrite who was known for his hypocrisy or one who was sick. A man would be brought to the prayers, supported by two others, so that he could stand in the row."
In al-Saheehayn it is narrated that the Prophet (peace and blessings of Allaah be upon him) said: "I was thinking of commanding that the call to prayer should be given, then the iqaamah, then I would command a man to lead the people in prayer, and I would go out with some men carrying bundles of wood to people who do not attend the prayers, and I would burn their houses with them inside." There are many ahaadeeth which speak of the importance of the prayer and urge us to pray in the mosques. It is obligatory for the Muslims to pray regularly in the mosques and encourage one another to do that and to co-operate in doing so… But in the case of one who is far away from the mosque and cannot hear the call to prayer except via the loudspeaker, he is not obliged to attend the mosque and he and others who are with him can pray in jamaa'ah on their own, because of the apparent meaning of the ahaadeeth quoted above. But if they take on the hardship and join the congregation in the mosque from which they cannot hear the call to prayer except via loudspeakers, because they are far away from it, that will increase their reward, because the Prophet (peace and blessings of Allaah be upon him) said, "The people who will earn the greatest reward for prayer are those who live farthest away, (and the further away you live, the more reward you will earn)." And there are very many ahaadeeth which speak of the virtues of going to the mosque and encourage us to do so. And Allaah is the Source of strength.
Majmoo' Fataawa al-Shaykh Ibn Baaz (may Allaah have mercy on him), vol. 12, 58-61
The scholars said concerning the guidelines on hearing the call to prayer (adhaan):
Al-Shaafa'i (may Allaah have mercy on him) said: [the guideline is the distance within which the adhaan can be heard] if the muezzin has a loud voice and a person can hear (i.e., he is not deaf), and there is little noise and the wind is still – because if the muezzin does not have a loud voice, and the people are not paying attention, and there is a lot of noise, then fewer people would hear the call.
Al-Umm, vol. 1, p. 221
Al-Nawawi said: the guideline with regard to hearing the call to prayer is that the muezzin stands at a certain location in the city, there is no noise and the wind is still, and a person can hear him; if a person can hear him he is obliged to attend the prayers in the mosque, and if he cannot hear him, he is not obliged.
(al-Majmoo' Sharh al-Muhadhdhab, vol. 4, p. 353
Ibn Qudaamah said: The furthest place from which the call can usually be heard– if the muezzin has a strong voice and stands in a high place, and the wind is still and there is no noise, and the listener is not inattentive – is the distance which is to be taken into account.
(al-Mughni, vol. 2, p. 107).