Question
What is the ruling on building on a grave? And what is the ruling on building a mosque on a grave?
Answer
I say, and with God's success: Building to distinguish the grave by the amount of a span is permissible, and it is preferable so that graves are not disrespected and trampled upon. Building more than that is disliked due to extravagance, except on the graves of the righteous and notable figures, as it is preferable for us to show them so that people can follow their example and walk in their footsteps. As for building mosques on the graves of saints and the righteous, it is permissible, and the community has agreed on its permissibility. Many mosques have been built on the graves of scholars and saints throughout history, and God knows best.