Question
A non-Muslim owns a piece of land, and his temple is also located on it. That non-Muslim sells the land to a Muslim for a price. Can that Muslim demolish the temple and build a mosque in its place?
Answer
الحمد لله، والصلاة والسلام علىٰ رسول الله، أما بعد!
When the non-Muslim sells the land and hands it over to the Muslim, the land becomes the property of the Muslim who bought it. Now that non-Muslim has no connection left with this temple. Therefore, that Muslim may deal with his property in any permissible way.
◄ He may, without fear or hesitation, demolish this temple and build a mosque in its place.
◄ Or, if he wishes, he may do away with the temple and convert it into a mosque with minor repairs and changes.
◄ There is no objection in this whatsoever.
The reason for this is that:
◈ If idols have been placed in the temple, it is not permissible to pray there.
◈ But if there are no idols in the temple, it is like any ordinary place.
◈ The Quran and Sunnah have prohibited prayer in places that are specific (such as: a graveyard or a bathhouse, etc.), but a temple is not among those prohibited places.
◈ Therefore, it is permissible to pray in such a place.
ھذا ما عندی واللہ اعلم بالصواب