one seeks by performing the funeral prayer over him; therefore, visiting him after his death is of the same order as praying for him. The Sunnah in this matter (1) is to greet the deceased and supplicate for him, whether he was a prophet or not, just as the Prophet ﷺ used to instruct his Companions that, when they visited the graves, one of them should say:
“Peace be upon you, O inhabitants of these dwellings from among the believers and Muslims. Surely—if Allah so wills—we shall join you. May Allah have mercy on those of us and you who have gone ahead and those who come later. We ask Allah for well-being for us and for you.” (2)
and:
“O Allah, do not deprive us of their reward, do not subject us to trial after them, and forgive us and them.” (3)
He would say the same when he visited the people of al-Baqīʿ—those Companions and others buried there (4)—or when he visited the martyrs of Uḥud and other graves. (5)
Moreover, performing prayer at their graves or at the graves of anyone else is not deemed recommended by any of