Ahmad—may Allah Most High have mercy on him—said, as reported by Abū Dāwūd:
‘If a mosque contains timbers that retain monetary value but have deteriorated, they may be sold and the proceeds spent on the mosque.’
Fourth: If a mosque falls into ruin and its materials are suitable for another mosque that needs them, they are transferred to it, while the land is sold. This applies if the mosque cannot be rebuilt with the proceeds from selling some of its materials; otherwise, those materials are sold and the proceeds used to rebuild it. Ahmad expressly stated this.
Fifth: If a mosque becomes too small for its congregation, or people disperse from it because the neighbourhood has fallen into ruin, it is sold and the proceeds spent on building another mosque, or acquiring a share in a mosque.”
The jurist who stated this has thus made clear that it cannot be sold when its usefulness has ceased altogether, but only when something usable remains. The purpose, then, is to replace it with something more beneficial to the endowment’s beneficiaries. None of our school’s jurists stipulated that leasing the site must be impossible, although it is known that in most cases the site can be leased. Its beneficiaries, however, receive less from it than they would if it were built upon. If it is sold, the proceeds may purchase something whose rental income is more beneficial to them. This is because someone will buy the site to build upon it for his own use, benefiting from it as his property, and will therefore be interested in acquiring it. Its sale proceeds can then purchase something yielding a more beneficial income than the site itself.
This, then, is the case whose permissibility our school’s jurists have agreed upon. In essence, it amounts to their replacing the endowment for its beneficiaries with something more beneficial to them.