Sunan Ibn Majah – Hadith No : 1565

It wasnarrated that Abu Hurairah said: “When the Messenger of Allah(ﷺ)offered the funeral prayer he would say: ‘Allahummaghfirlihayyinawa mayyitina, wa shahidina wa gha’ibina, wa saghirina wakabirina,wa dhakarina wa unthana. Allahumma man ahyaitahu minnafaahyihi‘alal-Islam, wa man tawaffaytahu minna fa tawaffahu ‘alal-iman.Allahumma la tahrimna ajrahu wa la tudillana ba’dah. [O Allah,forgive our living and our dead, those who are present and those whoare absent, our young and our old, our males and our females. OAllah,whomever of us You cause to live, let him live in Islam, andwhomeverof us You cause to die, let him die in (a state of) faith. OAllah, donot deprive us of his reward, and do not let us go astrayafterhim].’”

Hadith In Arabic Text :

حدثنا سويد بن سعيد، حدثنا علي بن مسهر، عن محمد بن إسحاق، عن محمد بن إبراهيم، عن أبي سلمة، عن أبي هريرة، قال كان رسول الله صلى الله عليه وسلم إذا صلى على جنازة يقول ‏”‏ اللهم اغفر لحينا وميتنا وشاهدنا وغائبنا وصغيرنا وكبيرنا وذكرنا وأنثانا اللهم من أحييته منا فأحيه على الإسلام ومن توفيته منا فتوفه على الإيمان اللهم لا تحرمنا أجره ولا تضلنا بعده ‏”‏ ‏.‏

Chapter : Chapters Regarding Funerals – كتاب الجنائز