Sunan Ibn Majah – Hadith No : 1558

It wasnarrated that Anas bin Malik said: “A funeral (procession)passedby the Prophet (ﷺ) and they praised (the deceased) and spokewellof him. He said: ‘(Paradise is) guaranteed for him.’ Then anotherfuneral passed by and they spoke badly of him, and he (the Prophet(ﷺ)) said: ‘(Hell is) guaranteed for him.’ It was said: ‘OMessengerof Allah, you said that (Paradise was) guaranteed for thisone andthat (Hell was) guaranteed for the other one.’ He said: ‘Itis thetestimony of the people, and the believers are the witnessesof Allahon earth.’”

Hadith In Arabic Text :

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

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