Mishkat al-Masabih

He reported God’s messenger as saying, “When you see a funeral stand up; but anyone who follows it must not sit down till the bier is placed on the ground.” (Bukhari and Muslim.)

وَعَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا رَأَيْتُمُ الْجَنَازَةَ فَقُومُوا فَمَنْ تَبِعَهَا فَلَا يَقْعُدْ حَتَّى تُوضَعَ»