Ahmad ibn Muhammad, from Al-Hasan ibn Mahbub, from Muhammad ibn Sinan, from Ishaq ibn Ammar, who said:
I heard Abu Abdullah عليه السلام, say: "When you descend into a grave, say: ‘In the name of Allah سبحانه وتعالى, and by Allah سبحانه وتعالى, and upon the faith of the Messenger of Allah سبحانه وتعالى, peace be upon him and his family.’ Then lower the deceased gently. When you place him in his grave, untie the knot of his shroud and say: ‘O Allah سبحانه وتعالى, this is Your servant and the son of Your servant who has descended to You, and You are the best to be descended to. O Allah سبحانه وتعالى, if he was a doer of good, then increase his goodness, and if he was a wrongdoer, then overlook his wrongs. Join him with his Prophet Muhammad صلى الله عليه وعلى آله وسلم, and the righteous of his followers. Guide us and him to the straight path. O Allah سبحانه وتعالى, Your forgiveness, Your forgiveness.’ Then place your left hand on his left shoulder and shake him firmly, and say: ‘O so-and-so, son of so-and-so, when you are asked, say: Allah سبحانه وتعالى is my Lord, Muhammad صلى الله عليه وعلى آله وسلم is my Prophet, Islam is my religion, the Quran is my Book, and Ali عليه السلام is my Imam." Continue listing the Imams عليه السلام until you mention them all. Then repeat the statement to him and ask: ‘Did you understand, O so-and-so?’ Imam عليه السلام said: "Indeed, he will respond and say: Yes." Then say: ‘May Allah سبحانه وتعالى make you firm with the firm word, may Allah سبحانه وتعالى guide you to the straight path, and may Allah سبحانه وتعالى establish a connection between you and His friends in a place of mercy.’ Then say: ‘O Allah سبحانه وتعالى, make the earth light upon his sides, raise his soul to You, and grant him a proof from You. O Allah سبحانه وتعالى, Your forgiveness, Your forgiveness.’ Then begin placing the clay and bricks, and as you do so, say: ‘O Allah سبحانه وتعالى, fill his loneliness, comfort his solitude, remove his fear, and let Your mercy descend upon him in such a way that he has no need of the mercy of anyone else. Indeed, Your mercy is for the wrongdoers.’ Then leave the grave and say: ‘Indeed, we belong to Allah سبحانه وتعالى and to Him we shall return. O Allah سبحانه وتعالى, raise his rank to the highest levels, grant his family continuity, and we entrust him to You, O Lord of the worlds.’