His statement, “And it is not to be sold,” means that an endowment is not to be sold, because selling it entails nullifying the endowment. If we were to permit its sale, ownership would pass to the purchaser and the endowment would be invalidated. An endowment is a binding contract and may not be sold. It may, however, be leased, because its rental income is derived from the benefit that has been dedicated. Nor may it be pledged as security, because a pledge is intended to enable the pledged property to be sold and the debt recovered from it. If we say that it may not be sold, then pledging it serves no purpose. Either we say that the pledge is valid and that it may be sold to settle the debt—which entails nullifying the endowment—or we say that the pledge is invalid, because even if it were valid, it would serve no purpose. Thus, it may not be sold, nor may any contract intended to result in its sale be made concerning it.
“Unless its benefits cease, in which case its price is to be spent on something similar to it. Even if it is a mosque, its furnishings and whatever exceeds its needs may be transferred to another mosque or given in charity to poor Muslims.”
His statement, “Unless its benefits cease”: in this case, it may be sold. For example, if a man endows his house for his children and the house collapses, it may be sold.
His statement, “It is not to be sold unless its benefits cease,” apparently indicates that it may not be sold under any circumstances except in this case. This is because one of the established principles is that “an exception is the criterion of generality”; that is, it establishes generality in all cases other than the one excluded. Accordingly, it may not be sold in any circumstance except when its benefits have ceased.
If its benefits diminish but do not cease altogether, it is not to be sold; rather, it remains as it is until its benefits cease, even if it is of no real benefit.
Shaykh al-Islam, may Allah have mercy on him, held that it may be sold when doing so serves an interest, so that it may be replaced with something better. He cited as evidence the account of the man who vowed that, if Allah granted His Messenger, peace and blessings be upon him, the conquest of Makkah, he would pray in Jerusalem.