Participation in Burial Service and Burial
Participation in the burial service of a Muslim and accompaniment of the funeral procession up to the graveyard have been designated as acts of great merit in ahadith; in fact, our most exalted Prophet has called it a right of the dead that the living ones pray for them and accompany them to the graveyard.
Although participation in burial services and burials are fard kifayah, i.e. if a few do these, it does not remain compulsory for others, yet both are acts of great merit.
Abu Hurairah has reported that our holiest Prophet said that "Whosoever participates in a burial service earns one carat and if he remains till the burial is complete, then he gets two carats, each carat being equal to the Mouth of Ohud."
They should participate in this prayer not as a matter of pure form but for the sake of Allah's pleasure. This would certainly fetch much merit,. Accompanying the funeral procession after the prayers is, as said above, an act of great goodness, which according to Mujahid, is of a higher order than nafl prayers. (Fath-al-Bari, p. 193, vol 3, ref Abd-al Razzaq).