The Messenger of Allah ﷺ led us in the funeral prayer over a man from the Muslims, and I heard him say, "O Allah, so-and-so the son of so-and-so is under Your protection, so guard him from the trial of the grave."Abdul-Rahman's version reads, "He is under Your protection and the bond of Your neighborly care, so guard him from the trial of the grave and the punishment of the Fire. You are the One who fulfills promises and is worthy of all praise. O Allah, forgive him and have mercy upon him, for You are the Forgiving, the Merciful."Abdul-Rahman narrated this from Marwan bin Janah.
حدثنا عبد الرحمن بن إبراهيم الدمشقي حدثنا الوليد ح و حدثنا إبراهيم بن موسى الرازي أخبرنا الوليد وحديث عبد الرحمن أتم حدثنا مروان بن جناح عن يونس بن ميسرة بن حلبس
صلى بنا رسول الله ﷺ على رجل من المسلمين فسمعته يقول اللهم إن فلان بن فلان في ذمتك فقه فتنة القبر قال عبد الرحمن من ذمتك وحبل جوارك فقه من فتنة القبر وعذاب النار وأنت أهل الوفاء والحمد اللهم فاغفر له وارحمه إنك أنت الغفور الرحيم قال عبد الرحمن عن مروان بن جناح
[Sahih]. Ibn Majah narrated it in the Book of Funerals, chapter on what has been said about the supplication in the funeral prayer, no. 1499, from Abdul-Rahman bin Ibrahim, with the same wording. Ibn Hibban graded it sahih, no. 758. Walid bin Muslim, no. 3173, stated explicitly that he heard it in an unbroken chain. See al-Awsat by Ibn Munzir, 5/441.