Ibn Umar was told that Abu Huraira said, “Whoever accompanies the funeral procession will have a reward equal to one Qirat.” Ibn ‘Umar said, “Abu Huraira talks of a too enormous reward.” Aisha attested Abu Huraira’s narration and said, “I heard Allah’s Apostle saying like that.” Ibn Umar said, “We have lost numerous Qirats.”
Narrated Abu Huraira:
that Allah’s Apostle (p.b.u.h) said, “Whoever attends the funeral procession till he offers the funeral prayer for it, will get a reward equal to one Qirat, and whoever accompanies it till burial, will get a reward equal to two Qirats.” It was asked, “What are two Qirats?” He replied, “Like two huge mountains.”
The Sunnah indicates that the one who attends the funeral until he offers the prayer will have one qiraat, and whoever attends until the deceased is buried will have two qiraats.
A qiraat is a large amount of reward, which the Prophet (peace and blessings of Allaah be upon him) likened to the mountain of Uhud.There are five categories of attending funerals [IslamQA]:
- Attending from the time the deceased is brought out of his house, until the funeral prayer is offered for him and the burial is finished. This is the most complete category, for which there are two huge qiraats of reward.
- Attending from the time the deceased is brought out of his house, until the funeral prayer is offered for him. This brings one qiraat of reward.
- Offering the funeral prayer for him, even if one did not come with the deceased from the time he was brought out of his house. This brings one qiraat according to the view favoured by al-Haafiz Ibn Hajar, but it is less than the reward of one who attended from time the deceased was brought out of his house, until the funeral prayer is offered for him.
- Attending the burial only, without offering the funeral prayer. The apparent meaning of the hadeeth is that there is no qiraat in this case, but a person will be rewarded in accordance with his actions.
- Following the funeral procession for a while, then leaving, without attending the prayer or the burial. There is the hope that a person will be rewarded in accordance with his intention in this case.
Narrated ‘Amir bin Rabi’a:,
The Prophet said, “Whenever you see a funeral procession, stand up till the procession goes ahead of you.” Al-Humaidi added, “Till the coffin leaves you behind or is put down.”
Narrated ‘Amir bin Rabi’a:
The Prophet said, “If any one of you see a funeral procession and he is not going along with it, then he should stand and remain standing till he gets behind it, or it leaves him behind, or the coffin is put down before it goes ahead of him . “
Narrated Said Al-Maqburi:
That his father said, “While we were accompanying a funeral procession, Abu Huraira got hold of the hand of Marwan and they sat down before the coffin was put down. Then Abu Said came and took hold of Marwan’s hand and said, “Get up. By Allah, no doubt this (i.e. Abu Huraira) knows that the Prophet forbade us to do that.” Abu Huraira said, “He (Abu Said) has spoken the truth.”
Narrated Abu Said Al-Khudri
The Prophet said, “When you see a funeral procession, you should stand up, and whoever accompanies it should not sit till the coffin is put down.”
Narrated Jabir bin ‘Abdullah :
A funeral procession passed in front of us and the Prophet stood up and we too stood up. We said, ‘O Allah’s Apostle! This is the funeral procession of a Jew.” He said, “Whenever you see a funeral procession, you should stand up.”
Narrated ‘Abdur Rahman bin Abi Laila:
Sahl bin Hunaif and Qais bin Sad were sitting in the city of Al-Qadisiya. A funeral procession passed in front of them and they stood up. They were told that funeral procession was of one of the inhabitants of the land i.e. of a non-believer, under the protection of Muslims. They said, “A funeral procession passed in front of the Prophet and he stood up. When he was told that it was the coffin of a Jew, he said, “Is it not a living being (soul)?”
Following funeral processions of believers is recommended. Men must try and attend the funeral prayer and/or the burial after it. Lots of reward promised for it.
As for the last two narrations, Ali (RA) said about them that Prophet (SAW) did it only once. After this, the hukm came to not follow the non-Muslims in any of their practices. So this action of the Prophet (SAW) – standing for the funeral procession of a Jew – got abrogated. It is not allowed for a Muslim to attend the funeral procession / prayer / burial of a non-Muslim.
If there are people among the kuffaar who can bury their own dead, then the Muslims should not bury them, or join the kuffaar and help them to bury them, or try to please the kuffaar by joining the funeral procession, even if this is a political practice. Such things are not known from the Messenger of Allaah (peace and blessings of Allaah be upon him) or the Khulafaa’ al-Raashidoon. In fact, Allaah forbade His Messenger (peace and blessings of Allaah be upon him) to stand by the grave of ‘Abd-Allaah ibn Ubayy ibn Salool, and explained that the reason for this prohibition was that the man was a kaafir. Allaah said (interpretation of the meaning):
“And never (O Muhammad) pray (funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave. Certainly they disbelieved in Allaah and His Messenger, and died while they were Faasiqoon (rebellious, — disobedient to Allaah and His Messenger).” [al-Tawbah 9:84]
If there is nobody among them who can bury their dead, then the Muslims should bury them, as the Prophet (peace and blessings of Allaah be upon him) did with those who were killed at Badr, and as he did with his uncle Abu Taalib, when he died, and he [the Prophet (peace and blessings of Allaah be upon him)] said to ‘Ali: “Go and bury him.”
[Taken from IslamQA]
More details here.