Anas bin Malik reported,

A funeral procession passed by the Messenger of Allah ﷺ, and he said, "Say what you know of him."The people said, "As far as we knew, he loved Allah and His Messenger," and they spoke well of him.He said, "It is confirmed."Then another funeral passed by him, and he said, "Say what you know of him."The people said, "He was a wretched man in the religion of Allah."He said, "It is confirmed. You are Allah's witnesses on earth."

Ahmad 13039

Sahih

حدثنا عبد الرزاق حدثنا معمر عن ثابت

عن أنس قال

مر بجنازة على رسول الله ﷺ فقال أثنوا عليها فقالوا كان ما علمنا يحب الله ورسوله وأثنوا عليه خيرا فقال وجبت ثم مر عليه بجنازة أخرى فقال أثنوا عليها فقالوا بئس المرء كان في دين الله فقال وجبت أنتم شهداء الله في الأرض

أحمد 13039صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 13039
Ahmad 13039