Bulugh al-Maram 569
وَعَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ - صلى الله عليه وسلم: «مَنْ شَهِدَ الْجَنَازَةَ حَتَّى يُصَلَّى عَلَيْهَا ⦗١٦٤⦘ فَلَهُ قِيرَاطٌ, وَمَنْ شَهِدَهَا حَتَّى تُدْفَنَ فَلَهُ قِيرَاطَانِ». قِيلَ: وَمَا الْقِيرَاطَانِ? قَالَ: «مِثْلُ الْجَبَلَيْنِ الْعَظِيمَيْنِ». مُتَّفَقٌ عَلَيْهِ. وَلِمُسْلِمٍ: «حَتَّى تُوضَعَ فِي اللَّحْدِ». وَلِلْبُخَارِيِّ: «مَنْ تَبِعَ جَنَازَةَ مُسْلِمٍ إِيمَانًا وَاحْتِسَابًا, وَكَانَ مَعَهُ حَتَّى يُصَلَّى عَلَيْهَا وَيُفْرَغَ مِنْ دَفْنِهَا فَإِنَّهُ يَرْجِعُ بِقِيرَاطَيْنِ, كُلُّ قِيرَاطٍ مِثْلُ أُحُدٍ».
He also said: The Messenger of Allah ﷺ said: "Whoever attends the funeral until the prayer is offered over it will have a qirat, and whoever attends it until it is buried will have two qirats." It was said: "What are the two qirats?" He said: "Like two great mountains." Agreed upon. And Muslim has: "until it is placed in the niche of the grave." And al-Bukhari has: "Whoever follows the funeral of a Muslim out of faith and seeking reward, and stays with it until the prayer is offered over it and its burial is finished, will return with two qirats, each qirat like Uhud."