Q 2: What is
the ruling on offering Salah in a Masjid (mosque) lying next to a cemetery,
without a barrier in between except the Masjid’s wall?
A:
There is nothing wrong with offering Salah in a Masjid separated from the grave by a road or space beyond the Masjid’s wall. It is not prohibited for absence of the cause of the prohibition, namely, this Masjid is not built on a grave. But if the grave or the cemetery is contiguous to the Masjid’s wall, the Salah performed in it is invalid, because it is performed at a grave, which counts as a means leading to Shirk (associating others with Allah in His Divinity or worship).May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.