the endower’s intended purpose, since all of these serve the general benefit of Muslims. However, this view is very weak, because the benefit of mosques is ongoing, whereas the benefit of charity is temporary: its benefit comes to an end, benefiting those presently living but not those who come after them. The correct view, therefore, is that whatever exceeds the needs of the mosque must be directed to another mosque, unless that is not possible, or unless the people are suffering from famine, in which case they take precedence, for the sanctity of human beings is undoubtedly greater than the sanctity of a mosque.
Even if the mosque in question is a congregational mosque, the proceeds must be directed to a congregational mosque if feasible; otherwise, to a mosque in which the remaining prayers are performed. We stipulated a congregational mosque because it carries greater reward and merit, as the Friday prayer is performed there, whereas the Friday prayer is not performed in other mosques. Moreover, the number attending the Friday prayer is greater than in other mosques.
In summary: whenever it is permissible to sell an endowment, its proceeds must be directed to the purpose closest to that intended by the endower, in a way that is equivalent to, or as close as possible to, the original endowment.
Issue: Suppose that people decide to convert a mosque built of mud bricks into a reinforced-concrete mosque. May they demolish the first one or not? This is based on what we have mentioned, for the benefits of the mud-brick mosque have not ceased; rather, it is being replaced with something better and finer. According to the view of Shaykh al-Islam, there is no objection to this, and the reward of the second mosque belongs to the builder of the first mosque, because it is not possible for us to nullify the reward of the first endower while