Muhammad ibn Ahmad from Ahmad ibn al-Hasan ibn Ali ibn Faddal from Amr ibn Sa’id al-Mada'ini from Musaddiq ibn Sadaqah from Ammar ibn Musa al-Sabati from Abu Abdillah عليه السلام, peace be upon him:
I asked Imam al-Sadiq عليه السلام about the prayer over the deceased. Imam عليه السلام said: “You say takbir, then you say: ‘Indeed, we belong to Allah سبحانه وتعالى, and indeed to Him عز وجل we return. Indeed, Allah سبحانه وتعالى and His عز وجل angels send blessings upon the Prophet صلى الله عليه وعلى آله وسلم. O’ you who have believed, send blessings upon him and greet him with peace. O’ Allah سبحانه وتعالى, send blessings upon (Prophet) Muhammad صلى الله عليه وعلى آله وسلم and the family of Muhammad صلى الله عليه وعلى آله وسلم, And bless Muhammad صلى الله عليه وعلى آله وسلم and the family of Muhammad صلى الله عليه وعلى آله وسلم, just as You عز وجل sent blessings and bestowed blessings upon Ibrahim عليه السلام and the family of Ibrahim عليه السلام. Indeed, You عز وجل are Praiseworthy, Glorious. O’ Allah سبحانه وتعالى, send blessings upon Muhammad صلى الله عليه وعلى آله وسلم and upon the leaders of the Muslims (meaning Imams عليه السلام). O’ Allah سبحانه وتعالى, send blessings upon Muhammad صلى الله عليه وعلى آله وسلم and upon the Imam عليه السلام of the Muslims. O’ Allah سبحانه وتعالى, Your servant ‘so-and-so’ (the deceased) and You عز وجل know him best. O’ Allah سبحانه وتعالى, join him with his Prophet Muhammad صلى الله عليه وعلى آله وسلم, may Allah سبحانه وتعالى send blessings upon him and his family, And make spacious for him his grave, And illuminate it for him, And raise his soul, And prompt him with his proof, And make what is with You عز وجل better for him. And return him to better than what he was in. O’ Allah سبحانه وتعالى, with You عز وجل we count him, so do not deprive us of his reward and do not test us after him. O’ Allah سبحانه وتعالى, Your pardon, Your pardon.’ (Imam عليه السلام then continued) “You say all of this in the first takbir, then you say the second takbir and you say: ‘O’ Allah سبحانه وتعالى, Your servant ‘so-and-so’ (the deceased), O’ Allah سبحانه وتعالى, join him with his Prophet Muhammad صلى الله عليه وعلى آله وسلم, may Allah سبحانه وتعالى send blessings upon him and his family, And make spacious for him his grave, And illuminate it for him, And raise his soul, And prompt him with his proof, And make what is with You عز وجل better for him, And return him to better than what he was in. O’ Allah سبحانه وتعالى, with You عز وجل we count him, so do not deprive us of his reward. And do not test us after him. O’ Allah سبحانه وتعالى, Your pardon, O’ Allah سبحانه وتعالى, Your pardon.’ (Imam عليه السلام then continued) “You say this in the second, third, and fourth takbir. Then when you say the fifth takbir, say: ‘O’ Allah سبحانه وتعالى, send blessings upon (Prophet) Muhammad صلى الله عليه وعلى آله وسلم and the family of Muhammad صلى الله عليه وعلى آله وسلم. O’ Allah سبحانه وتعالى, forgive the believing men and believing women. O’ Allah سبحانه وتعالى, unite their hearts and cause me to die upon the religion of Your Messenger صلى الله عليه وعلى آله وسلم. O’ Allah سبحانه وتعالى, forgive us and our brothers who preceded us in faith, and do not place in our hearts any resentment toward those who have believed. Our Lord عز وجل, indeed You عز وجل are Kind and Merciful. O’ Allah سبحانه وتعالى, Your pardon, O’ Allah سبحانه وتعالى, Your pardon.’ And you give the final salutation.”