The shaykh and imam, the learned and eminent scholar Abū al-‘Abbās Ahmad ibn ‘Abd al-Halīm ibn Taymiyyah—may Allah sanctify his soul—said:
Section: Replacing Endowed Property
Endowed property—even mosques—may be replaced with its equivalent or something better on grounds of need or benefit. The same applies to replacing sacrificial animals designated for pilgrimage, animals designated for the Eid sacrifice, and things pledged by a vow. Likewise, a comparable beneficiary may be substituted for the designated beneficiary when the benefit cannot be delivered to the latter.
Replacement may take place through a direct exchange for a substitute, or through a sale followed by the purchase of a replacement with the proceeds. According to Ahmad’s school, endowed property other than a mosque may be sold when there is a need.
A mosque, too, may be sold when there is a need, according to the better-known of the two reports from him. According to the other report, its land may not be sold; rather, its building materials are moved to another location.
A “copy of the Quran” is analogous: selling it is regarded as either prohibited or merely discouraged. Exchanging it, however, is permissible without any disapproval according to one of the two reports from him. Yet the apparent position of his school is that, if it is sold and another is purchased with the proceeds, this falls within the category of