Maintaing the Masjids Refers to the Prayer
Question :
Allâh Almighty says:
"The Masjids of Allah shall be maintained only by those who believe In Allah and the Last Day"
What does it mean to maintain ('Imarah) Masjids? And is it permissible for disbelievers, such as Christians, to help build a Masjid?
Answer:
The realization of "maintaining" the Masjid is through prayer, obedience, and I'tikaf as well as the other physical and verbal forms of worship. So the verse praises those who frequently worship in Masjids through various means, and it testifies to their faith.
In a Hadith that At-Tirmithi graded Hasan, the Messenger of Allâh ﷺ said :
"If you see a man frequenting the Masjids, bear witness for him that he has faith."
For these reasons, the disbelievers cannot maintain Masjids:
"It is not for the idolaters to maintain the Masjds of Allah."
This includes building them from lawful wealth, and seeking reward for doing so. For indeed there are texts that mention the virtues of building Masjids for the Face of Allâh Almighty. As for those who disbelieve in Allâh, this does not apply to them, and they do not benefit if they were to spend their wealth in maintaining Masjids since their deeds are wasted by their Shirk. But if they were to give some of their wealth as a form of charity to maintain the Masjids, then prayer in them would be allowed.
Source:
Ibn Jibreen
Fatawa Islamiyah, Vol. 7 Pages 118-119