Abdul-Rahman bin Abu Layla reported,

Sahl bin Hunayf and Qays bin Saad were sitting in Qadisiyyah when a funeral procession passed by them, so they stood up. They were told, "It is the funeral of one of the local people," meaning one of the protected non-Muslim residents.They replied, "A funeral procession once passed by the Prophet ﷺ and he stood up. He was told, 'It is the funeral of a Jew.' He said, 'Is it not a soul?'"

Bukhari 1312

Sahih

حدثنا آدم حدثنا شعبة حدثنا عمرو بن مرة قال سمعت

عبد الرحمن بن أبي ليلى قال

كان سهل بن حنيف وقيس بن سعد قاعدين بالقادسية فمروا عليهما بجنازة فقاما فقيل لهما إنها من أهل الأرض أي من أهل الذمة فقالا إن النبي ﷺ مرت به جنازة فقام فقيل له إنها جنازة يهودي فقال أليست نفسا

البخاري 1312صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Funerals
Chapter
One who stood up for a Jewish funeral
Numbering
Darussalam 1312
Bukhari 1312