It is narrated from Sayyiduna Abdullah bin Amr bin al-As (may Allah be pleased with them both) that a man said to the Messenger of Allah (peace and blessings be upon him): "O Messenger of Allah (peace and blessings be upon him)! The funeral of a disbeliever passes by us; should we stand up for it?" He (peace and blessings be upon him) said: "Yes, stand up for it, for in fact you do not stand for the sake of that (deceased); rather you stand because of the greatness and majesty of the Exalted Being Who takes the souls." Muhammad bin Yahya bin Abi Umar, Abu Ya'la, Ahmad bin Hanbal, Ibn Hibban in his Sahih and al-Hakim recorded this hadith, and Imam al-Bayhaqi also recorded it through al-Hakim's own chain.
Hadith Takhrij«أخرجه مسند أحمد برقم: 6537، وأخرجه فتح الباري برقم: 1250، وأخرجه شرح معاني الآثار برقم: 2784، وأخرجه الأوسط في السنن والإجماع والاختلاف برقم: 3039، وأخرجه السنن الصغير للبيهقي برقم: 1057»