and our final resting place.’ In other words, after the general supplication one then prays particularly for the deceased.
Allah-the Exalted-said about the hypocrites:
“Do not ever offer the funeral prayer for any of them who dies, nor stand at his grave; they have indeed disbelieved in Allah and His Messenger.” (al-Tawbah 9:84)
Since Allah forbade His Prophet ﷺ to pray over them or stand at their graves—because of their unbelief—this, by inverse implication, indicates that a believer should have the funeral prayer performed for him and that one may stand at his grave.
Accordingly, it is related in the Sunan collections that when a man from among his Companions was buried, the Prophet ﷺ would stand by the grave and say, “Ask steadfastness for him, for he is now being questioned.”
But to visit a grave with the purpose of asking the deceased for help, or swearing an oath by him before Allah, or believing that supplications are automatically answered at that spot—none of this was done by the predecessors of the ummah, neither the Companions nor the generation that followed them in excellence; it is a later innovation.
Indeed, Mālik and other scholars even disliked someone’s saying, “We have visited the grave of the Prophet ﷺ.”