Please explain to us how the funeral prayer is to be offered, as reported from the Prophet (Sallallāhu `alayhi wasallam), because many people were a bit confused about doing it.
Allāh, the Most Gracious, the Most Merciful;
All the praise and thanks is due to Allāh, the Lord of al-'ālameen. I testify that there is none worthy of worship except Allāh, and that Muhammad, sallallāhu`alayhi wasallam, is His Messenger.
The Solāh al-Janāzah is a Fardhu Kifāyah. If some members of the community do it then the rest are absolved of responsibility, but if all of them fail to do it then all are guilty of sin. It is offered for the deceased children (after 4 months), men, and women.
1. The deceased should be a Muslim.
A Muslim should not attend a non-Muslim’s funeral, but visiting him when he is sick is permissible, because this may serve an interest, namely opening his heart to Islam.
"And never (O Muhammad, (Sallallāhu `alayhi wasallam) pray (funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave. Certainly, they disbelieved in Allāh and His Messenger, and died while they were Fasiqun (rebellious, - disobedient to Allāh and His Messenger Peace and Blessings be upon him)."
Concerning taking care of funeral arrangements for a family member, it was narrated in a sahīh hadīth that Nājiyah ibn Ka’ab narrated that ‘Ali ibn Abi Tālib (radiyallahu`anhu) said:
“I said to the Prophet (Sallallāhu `alaihi wasallam), ‘Your old, misguided uncle has died (he was referring to his father Abu Tālib). Who will bury him?’ He (Sallallāhu `alayhi wasallam) said, ‘Go and bury your father.’ [I] said, ‘I will not bury him, for he died as a mushrik.’ He said, ‘Go and bury him, then do not do anything until you come to me.’ So I went and buried him, then I came to him with traces of dust and earth on me. He told me to wash myself, then he made duā’ for me in words that were more precious to me than everything on earth.”
[Al-Silsilah al-Sahīhah, by al-Albāni, no. 161]
So it is allowed for the Muslim to take care of the burial of his non-Muslim relatives and it does not cancel out one’s hatred of their shirik.
As we can see that ‘Ali (radiyallahu`anhu) initially refused to bury his father for that very reason, as he said, “he died as a mushrik.” He thought that if he buried him when this was the case, that this was included in the forbidden kind of friendship as referred to in the ayah (interpretation of the meaning): O ye who believe! Be not friendly with a folk with whom Allah is wroth, (a folk) who have despaired of the Hereafter as the disbelievers despair of those who are in the graves. [Al-Mumtahanah, 60:13]
But, when the Prophet (Sallallāhu `alayhi wasallam) repeated the command (to ‘Ali) to bury his (‘Ali’s) father, he hastened to obey him and he gave up the notion that had initially occurred to him.
This is what obedience means: That a person gives up his opinion in response to the command of his Prophet (Sallallāhu `alayhi wasallam).
It seems that a son’s burying his non-Muslim father or mother is the last act of good companionship that the son can do for his non-Muslim parent in this world. But after the burial, he cannot make du’a for him or pray for forgiveness for him, because of the unambiguous words of Allāh (interpretation of the meaning):
“It is not (proper) for the Prophet and those who believe to ask Allāh’s forgiveness for the Mushrikūn, even though they be of kin”
2. The body should be present.
Uunless the deceased died in a land where there are no Muslims to pray janāzah over him, then some Muslims may perform the janāzah for him in another land.
3. The deceased should be placed in front of the Imām.
The Imam should stand at the head of a man and the middle of a woman, as described in the sahīh ahādīth narrated from the Messenger of Allāh (Sallallāhu `alayhi wasallam). If there are a number of dead, men, women and children, the men should be placed closest to the imām, then boys, then women, then girls. The woman’s middle should be in line with the man’s head, so that the Imām will be standing in the correct position in relation to all of them, as prescribed in Sharī’ah.
4. The body should be washed.
5. He should not be a shahīd.
That is because the Prophet (Sallallāhu `alayhi wa sallam) did not pray over the martyrs of Uhud [narrated by al-Bukhāri, 1347], and because the purpose behind the funeral prayer is to intercede for the deceased. The martyr receives expiation for everything (so he has no need of intercession), apart from debt; debt is not waived because of martyrdom, and rather it remains owed by the deceased.
When the prayer is offered for a child, there should be no prayer for forgiveness, and it should not be said in the prayer “Allāhummaghfir lahu (O Allāh forgive him),” because no sins were recorded for him. Rather prayers should be said for forgiveness and mercy for his parents. That is because of the report narrated by Abu Dawud that (Sallallāhu ‘alaihi wa sallam) said: “The funeral Solāh should be offered for him and prayers should be said for forgiveness and mercy for his parents.” [Classified as sahīh by al-Albāni in Ahkām al-Janā’iz, p. 73.]
It is permissible to offer the funeral prayer for the deceased inside the graveyard just as it is permissible to offer the funeral prayer for him after he is buried, because it was proven that a woman used to clean the mosque and she died. The Prophet (Sallallāhu `alayhi wasallam) asked about her and they said, ‘She died.’ He said, ‘Why did you not tell me? Show me to her grave.’ So they showed him and he offered the prayer for her, then he said, ‘These graves are filled with darkness for their occupants, but Allāh illuminates them by my prayer over them.’”(Narrated by Muslim, 956)
[From Fatāwa al-Lajnah al-Dā’imah, 8/392]
How to Pray the Solāt al-Janāzah
The Prophet (Sallallāhu`alayhi wasallam) and his companions (radiyallahu`anhum) explained how the Solāt al-Janāzah is to be done. It is done as follows:
1. Standing and Facing the Ka’abah one enter the Solāh by saying the Takbīr (“Allāhu Akbar”), and with the Niyyah concurrently in the heart and then you seek refuge with Allāh from the accursed Shaytān, and then you say Bismillah ir-Rahmān ir-Rahīm and recite al-Fātihah may followed by a short sūrah or some āyahs.
2. Then you say Second Takbīr and send blessings upon the Prophet (Sallallāhu `alayhi wasallam), the Salawat Ibrāhīmiyah as one does at the end of the Solāh.
3. Then after Third Takbīr make duā’ of forgiveness and mercy, steadfast in Islam, to grant paradise, torment of grave and Hellfire for the deceased. The best is to say:
Allāhummaghfirli-hāiyina wa maiyitina, wa shāhidina wa ghā’ibina, wa saghīrina wa kabīrinā, wa zakarina wa unthāna.
(O Allah, forgive those of us who are living and those of us who are dead, those of us who are present and those of us who are absent, our young and our old, our male and our female)
Allāhumma manahyaitahu minnafa ahyihi ‘alal-Islam, wa man tawaffaitahu minna fatawiffahu ‘alal-Īmān.
(O Allah, to whomsoever of us Thou givest life grant him life in Islām, and whomsoever of us Thou takest in death take him in death with faith)
Allāhummaghfir lahu warhamhu, wa‘āfihi wā‘anhu, wa akrim nuzulahu wa wassa’ madkhalahu, waghsilhu bimā’ wa-thaljin wabarad, wa naqqihi minal-khatāya kama yunqqayi-thawbul-yadhu minaddanas.
(O Allāh , Forgive him and have mercy on him, keep him safe and sound and forgive him, and honour the place where he settles and make his entrance wide; wash him with water and snow and hail, and cleanse him of sin as a white garment is cleansed of dirt).
Allāhumma abdilhu dāran khayra min dārihi, wa ahlan khayra min ahlihi.
(O Allāh, Provide him a house better than his house and make his family better than before).
Allāhumma adkhilhul-jannah wa a’idhhu min ‘adzābil-qabri wa min ‘adzābil-nār wa afsah lahu fi qabrihi wa nawwir lahu fihi.
(O Allāh, admit him to Paradise and protect him from the torment of the grave and the torment of Hell-fire; make his grave spacious and fill it with light.
Allāhumma lā tahrimna ajrahu walatudillanā ba’dahu”
(O Allāh, do not deprive us of the reward and do not cause us to go astray after this death).
All of this was narrated from the Prophet (sallallāhu 'alaihi wasallam).If you make du’a with other words, this is permissible. For example, one could say:
“Allāhumma in kāna muhsinan fa zid fi ihsānihi wa in kāna musī’an fa tajāwaz ‘an sayi’ātihi. Allāhumma ighfir lahu wa thabbit-hu bi’l-qawl il-thābit"
(O Allāh, if he was a doer of good, then increases his good deeds, and if he was a wrongdoer, then overlooks his bad deeds. O Allāh, forgive him and give him the strength to say the right thing).
4. Then you say a Fourth Takbīr and pause for a little while, then you say one Taslīm to the right, saying “As-salāmu ‘alaykum wa rahmatullāh.”
There is no Adzān, Iqāmah, ruku or sujūd in Solāh al-Janāzah.
And Allāh knows best.
[Adapted from Islamhouse and Fatwa No: 12363 of Islam Q&A]