عَنْ جَابِرِ بْنِ عَبْدِ اللّٰہ رضى اللّٰہ عنهما قَالَ مَرَّ بِنَا جَنَازَةٌ فَقَامَ لَهَا النَّبِيُّ صلّى اللّٰہ عليه وسلّم وَقُمْنَا بِهِ. فَقُلْنَا يَا رَسُولَ اللّٰہ، إِنَّهَا جَنَازَةُ يَهُودِيٍّ. قَالَ: إِذَا رَأَيْتُمُ الْجَنَازَةَ فَقُومُوا.
Hazrat Jabir bin ‘Abdullah (ra) narrated, “A funeral procession passed by us, so the Prophet (sa) stood up for it and we stood up with him. We said, ‘O Allah’s Messenger (sa), it is the funeral procession of a Jew.’ He said, ‘When you see a funeral procession, stand up.’”
(Sahih al-Bukhari, Kitab al-jana’iz, Bab mun qama li janazati yahudiyyin, Hadith 1311)