Sheikh Ahmad al-Khudayrî, professor at al-Imâm University
Using Zakâh funds for mosques and Islamic schools is a matter of disagreement among Islamic jurists. The reason for this is their disagreement regarding the meaning of the phrase “in the path of Allah” that appears in the verse of the Qur’ân that sets forth who the lawful recipients of Zakâh are.
The verse reads: “The alms are only for the poor and the needy, and those employed to administer the (funds); for those whose hearts have been (recently) reconciled (to Truth); for those in bondage and in debt; in the path of Allah; and for the wayfarer: (thus is it) ordained by Allah, and Allah is full of knowledge and wisdom.” [Sûrah al-Tawbah: 60]
The matter under dispute is the scope of the phrase “in the path of Allah” – is it limited in its meaning to state financing of soldiers fighting in the path of Allah to defend the Muslim territories or is it general encompassing all aspects of righteousness and charity? The majority of jurists have traditionally held the opinion that it is limited to military defense, arguing that the purpose of the verse is to define and delimit who the eligible recipients of Zakâh funds are.
Some other scholars, particularly later scholars who have reviewed the question, prefer the view that it refers to all manner of good works, including the building and upkeep of public facilities like mosques and Islamic schools. This is the opinion that was arrived at by the Islamic Law Assembly of the Muslim World League as the majority opinion. It is also the view held by Sheikh Ibn Bâz, the former Grand Muftî of Saudi Arabia.
In any event, if you pledged that money to the mosque on the basis of a ruling issued by a reliable scholar, then your payment of Zakâh will be legally valid. As for the voluntary charity that you pledged, it is even more incumbent upon you to pay it to the mosque and fulfill your promise.
If you encounter people who are in desperate need, you may give them other money in charity or direct them to people who might be able to help them.
And Allah knows best.
Source: Islam Today