He answered:
As for a bequest concerning what is to be done upon his death, he may revoke or amend it by agreement of the Muslims, even if he has had it witnessed and formally recorded, whether it concerns an endowment, emancipation, or anything else. There are two well-known disputes concerning endowments and emancipation made conditional upon death. Establishing an endowment to provide oil or candles to be lit at a grave is not an act of righteousness, by agreement of the scholars. Indeed, it is established that the Prophet, peace and blessings be upon him, said:
“Allah has cursed women who visit graves and those who build mosques over them and place lamps upon them.”
As for lighting the Prophet’s Mosque for those praying there, or lighting other mosques, illuminating the houses of Allah is good. However, if the mosque already has enough for its lighting, additional lighting that serves no purpose has no legitimate benefit. Such surplus should not be spent on its lighting, but elsewhere. And Allah knows best.
He was asked:
What should be done when an endowment yields surplus revenue that is no longer needed?
He answered:
It should be spent on a comparable purpose. For example, if a mosque has funds beyond its needs, the surplus should be spent on another mosque. The founder’s intention concerns that general category of purpose, and the category remains the same. Thus, if the first mosque were to fall into ruin and no one benefited from it, its endowment revenue would be spent on another mosque. The same applies when something remains beyond its needs, for this