Praise be to Allaah.
There is no stipulation that Jumuâah prayer should be offered in a masjid or jaamiâ according to the majority of fuqahaâ of the Hanafi, Shaafaâi and Hanbali madhhabs, unlike the Maalikis.
It says in al-Bahr al-Raaâiq (2/162), which is a Hanafi book: The words âand general permissionâ mean: The condition of it being valid is that it should be done in the usual manner. So, for example, if a ruler were to close the gates of the fortress and lead his family and troops in offering Jumuâah prayer, that is not valid. This is what it says in al-Khulaasah. In al-Muheet it says that if he opens the gate of his palace and gives the people permission to enter, it is valid although it is makrooh, because he did not fulfil the right of the Jaamiâ mosque. End quote.
It says in Tarh al-Tathreeb (3/190): Our view (i.e., the Shaafaâi madhhab) is that establishing Jumuâah is not only to be done in the mosque; rather it may be performed in an ordinary building. If they do it in a place other than a mosque, the one who enters that place should not pray during the khutbah, because there is no âgreetingâ (2-rakâah prayer upon entering) for it. End quote.
It says in al-Insaaf (2/378), which is a Hanbali book: With regard to the words âit is permissible to perform it in various buildings or buildings that are on the edge of the wildernessâ, this is the view of our madhhab and it is the view of most of the scholars of the madhhab, many of whom stated it definitively. And it was said that it is not permissible to perform it anywhere except in the jaamiâ. End quote.
With regard to the Maalikis, they stipulated that it must be performed in the jaamiâ, as stated above.
Khaleel al-Maaliki said concerning the conditions of Jumuâah: It should be in a jaamiâ that is built separately.
In al-Taaj waâl-Ikleel (2/520) it says: âIn the jaamiâ.â Ibn Basheer said: The jaami â is one of the conditions of offering this prayer. Ibn Rushd said: It is not valid to establish Jumuâah except in a designated mosque. Al-Baaji said: One of the conditions is a mosque that is built specifically for that purpose in the usual style of mosques. End quote.
To sum up:
Jumuâah prayer in the place mentioned is valid according to the majority of scholars, if it is not possible to allocate a specific place for the Muslims to pray and if they cannot go to the nearest mosque or Islamic centre in which Jumuâah prayer is offered.
And Allah knows best.
Islam Q&A