Question: Someone built a Masjid (mosque) in Yemen and he made a will that his family should place his grave inside that Masjid. When he died, they buried him in the Masjid in the direction of the Qiblah (direction faced for Prayer towards the Ka‘bah). The distance between the courtyard where his grave lies and the Qiblah is only one meter. Please, guide us concerning this issue.
Answer: This grave should be dug up and the corpse should be carried to any place far from the Masjid such as the town graveyard. Placing a grave inside the Masjid is a means leading to Shirk (associating others with Allaah in His Divinity or worship)… read more here.