Question
Is it permissible to spend a non-Muslim’s money on building a mosque?
Answer
If a non-Muslim assists in building a mosque from lawful and pure earnings, then it is valid to use his lawful money in the mosque, because this is cooperation in righteousness and piety. The polytheists of Makkah built the Bayt Allah al-Sharif (the House of Allah) with their own lawful money, an example of which exists to this day. And the Messenger of Allah ﷺ did not have it demolished after the conquest of Makkah, but rather kept it in place, although the right to build belongs only to a Muslim, as it is in the Noble Quran.
﴿ مَا كَانَ لِلْمُشْرِكِينَ أَن يَعْمُرُوا مَسَاجِدَ اللَّـهِ شَاهِدِينَ عَلَىٰ أَنفُسِهِم بِالْكُفْرِ ۚ أُولَـٰئِكَ حَبِطَتْ أَعْمَالُهُمْ وَفِي النَّارِ هُمْ خَالِدُونَ﴾
The polytheist will not receive any reward for building or cooperating, because he has no faith, and without faith no one is accepted by Allah. Hafiz al-Ayni, in Umdat al-Qari Sharh Sahih al-Bukhari, volume 3, pp. 3 to 7, says under this very noble verse:
ان التعاون فى بناء المسجد المعتبر الذى فيه الاجر إنما كان للمومنين ولم يكن ذالك للكافرين” (الي آخره)
“That is, the reward for cooperating in the building of mosques is only for the believers; it is not for the disbelievers.”
Even if they build a mosque in which false worship is carried out. Thus, Abbas was taken captive on the occasion of the Battle of Badr and was reproached for his disbelief, and Ali (may Allah be pleased with him) was also harsh with him. So Abbas said, by way of boasting of his merit, “We built the Bayt Allah (so why are you being harsh with us?).” Upon this Allah the Exalted revealed the above-mentioned verse: “It is not for the polytheists to build the mosques of Allah,” and “those who took part in building the mosque in a state of disbelief, their deeds have gone to waste.” Then, in favour of the Muslims, this verse was revealed
﴿إِنَّمَا يَعْمُرُ مَسَاجِدَ اللَّـهِ مَنْ آمَنَ بِاللَّـهِ ﴾الاية
“That is, the mosque that is to be considered is the one that the people of faith have built.”
And what non-Muslims build is not counted or reckoned at all. The words of Umdat al-Qari end here.