Regarding the difference in scholarly opinion about the permissibility of paying Zakat to mosques, or other public interests, it hinges on two primary understandings of the intent of the Quranic phrase “in the path of God” (fi sabili’Llah) as it is used in the Zakat verse of Surat Al-Tawbah, 9:60. One understanding, which is a restricted minority opinion, interprets this phrase denotatively, that is to say, linguistically, and therefore literally. Scholars of this position, who are few, rule that the Zakat category of "in the path of God” (fi sabili’Llah) is inclusive of all virtuous activities and good deeds done in the service of God. They hold that without Revelation (in the Quran or from the Prophet, on him be peace) that specifies a restriction of this meaning, we have no recourse but to allow for all good works that qualify as “in the path of God” (fi sabili’Llah) and that legitimately maintain religion and the communal polity. Hence, building, refurbishing, or supporting a mosque is, to them, Zakatable because it qualifies as “in the path of God” (fi sabili’Llah) because all virtuous deeds do.
Other scholars, the vast majority, reject this understanding, because the Zakat verse lists specific Zakat eligible categories and “in the path of God” (fi sabili’Llah)” in its general linguistic sense encompasses the other seven categories. As it occurs in the Zakat verse, however, “in the path of God” (fi sabili’Llah)” strongly connotes a particular activity to the point that it has always been widely recognized as synonymous with it; namely, ‘physical struggle’ in the path of God.
These scholars of the majority position hold that “in the path of God” (fi sabili’Llah) is a term of art in Revelation whenever it is left unrestricted, not qualified by other Texts. It is of note that this is the one meaning that all scholars accept for this category based on its clear contextual interpretation as it occurs in the Quran, in general, and in this verse in particular, and as demonstrated in the use and understanding of this phrase by the first generation of Muslims, that is, the Prophet, on him be peace, and his Companions, God’s mercy on them, and by every generation of Muslims thereafter. Most legists that fix the understanding (and, therefore, the various applications) of this phrase in the Zakat verse to this meaning — which, again, is the majority — rule that Zakat cannot be paid to a mosque.
Yet there are some scholars of this second opinion — that “in the path of God (fi sabili’Llah) in the Zakat verse is synonymous with ‘physical struggle’ to elevate the Word of God — and, again, it is the stronger position — also extract from this the intent of Zakat’s seventh category as its governing rule, based on which, they hold that institutions, functions, and forums that facilitate striving in establishing, defending, and supporting Islam as a religion and as a community qualify for Zakat. This opens up its Zakat application to many kinds of activity — cultural, educational, and informational. Indeed, some scholars hold that this is today a primary application of this Zakat category.
In this understanding, Islamic centers, including mosques (and also Islamic schools, hospitals, and specified kinds of informational organs or means), are Zakatable if they “provide correct and pure Islamic information to men and women throughout the world … even in Muslim countries, to provide Islamic education and training” to all people, and to “protect the faith of [Muslims] from deviation, agnosticism, and behaviorial corruption,” as Shaykh Yusuf Al-Qardawi has written in his magisterial and indispensable work on the jurisprudence of Zakat, Fiqh az-Zakat.
Others have ruled more narrowly, for example, that a locality that has no mosques for worshippers to attend, or a mosque too small to accommodate all its congregants, can lawfully spend Zakat on building, expanding, or repairing a mosque. They include, moreover, paying an Islamically qualified imam for the mosque from Zakat if the community has none to teach and guide it, regardless of the imam’s wealth status.