160 – As Allah, Exalted is He, says: “And never pray over any one of them who dies, nor stand by his grave.” (Surah al-Tawbah, 9:84).
161 – Thus He forbade His Prophet ﷺ to perform the funeral prayer for the hypocrites or to stand at their graves. The implication is that believers, by contrast, are to have the prayer offered for them and for people to stand at their graves.
Purpose of visiting graves
162 – A number of leading scholars, early and later, have stated that “standing at their graves” means to supplicate for them and seek forgiveness on their behalf.¹
163 – Accordingly, the objective of visiting the grave of a believer—whether a prophet or anyone else—is to greet him and pray for him. Turning graves into places of worship or committing acts of polytheism through them, however, is absolutely forbidden by the consensus of the Muslims.
Hadiths warning against taking graves as places of worship
164 – As recorded in the two Ṣaḥīḥs, the Prophet ﷺ, during the illness from which he passed away, said: “May Allah curse the Jews and the Christians; they turned the graves of their prophets into places of worship,” thereby warning against their practice. ʿĀʾishah said, “Had that not been the case, his grave would have been made prominent, but he disliked that it be taken as a mosque.”²