It was narrated from Abu Hurairah that the Messenger of Allah صلی اللہ علیہ وآلہ وسلم said: “Whoever follows the funeral of a Muslim man, seeking reward, and offers the prayer and buries him, will have two Qirats. And whoever offers the funeral prayer then goes back before the burial, then he returns with one Qirat of reward.” (Sahih)