An-Nawawi (may Allah have mercy on him) said: Offering the funeral prayer for the deceased is a communal obligation with no difference of opinion among us, which means there is (scholarly) consensus.
Attending a funeral is a duty that a Muslim owes to his fellow Muslim. Al-Bukhaari (1240) and Muslim (2162) narrated that Abu Hurayrah (may Allaah be pleased with him) said: I heard the Messenger of Allaah ﷺ say: “The rights of one Muslim over another are five: (amongst which he mentioned) “attending funerals”.
Also there is great reward in it. It was narrated that Abu Hurayrah (may Allaah be pleased with him) said: The Messenger of Allaah ﷺ said: “Whoever attends a funeral until he offers the (funeral) prayer will have one qiraat (of reward) and whoever attends until the burial is done will have two qiraats.” It was said: “What are the two qiraats?” He said: “Like two great mountains.” (Narrated by al-Bukhaari, 1261; Muslim, 945)
Funeral for Martyr is not to be offered
Ibn al-Qayyim (may Allah have mercy on him) said: The funeral prayer is not to be offered for the martyr who was killed in battle, because the Messenger of Allah ﷺ did not offer the funeral prayer for the martyrs of Uhud, and it is not known that he offered the funeral prayer for any of those who were martyred fighting alongside him in his campaigns.
Steps to be followed.
1. First takbir said. (#1)
2. Surah al Fatiha read + another surah.
3. Second takbir said. (#2)
4. Then recite salah Ibrahim and Muhammed (SalAllaahu alayhi wasalam)
5. Next takbir (#3)
6. Dua for the person who has died from the Sunnah (mentioned below).
7. Next takbir (#4)
8. Pause for a little while.
9. Then taslimah – one taslim to the right is what majority of the Scholars say is the Sunnah but some also say that Two Taslim is also fine
Dua to be recited for an Adult
اللهُـمِّ اغْفِـرْ لِحَيِّـنا وَمَيِّتِـنا وَشـاهِدِنا ، وَغائِبِـنا ، وَصَغيـرِنا وَكَبيـرِنا ، وَذَكَـرِنا وَأُنْثـانا . اللهُـمِّ مَنْ أَحْيَيْـتَهُ مِنّا فَأَحْيِـهِ عَلى الإِسْلام ،وَمَنْ تَوَفَّـيْتَهُ مِنّا فَتَوَفَّـهُ عَلى الإِيـمان ، اللهُـمِّ لا تَحْـرِمْنـا أَجْـرَه ، وَلا تُضِـلَّنا بَعْـدَه
“Allaahumma ighfir lihaayina wa mayitina wa shaahidina wa ghaa’ibina wa sagheerina wa kabeerina wa dhakarina wa unthaana. Allaahumma man ahyaytahu minna fa ahyihi ‘ala’l-Islam wa man tawaffaytahu minna fa tawiffahu ‘ala’l-eemaan. Allaahumma ighfir lahu warhamhu wa ‘aafihi wa a’fu ‘anhu, wa akrim nuzulahu wa wassi’ madkhalahu waghsilhu bi’l-maa’ wa’l-thalj wa’l-barad, wa naqqihi min al-khataaya kama yunaqqa’ al-thawb al-abyad min al-danas. Allaahumma abdilhu daaran khayra min daarihi wa ahlan khayra min ahlihi. Allaahumma adkhilhu al-jannah wa a’idhhu min ‘adhaab il-qabri wa min ‘adhaab il-naar wa afsah lahu fi qabrihi wa nawwir lahu fihi. Allaahumma laa tahrimna ajrahu wa la tadillanaa ba’dahu
(O Allaah, forgive our living and our dead, those who are present among us and those who are absent, our young and our old, our males and our females. O Allaah, whoever You keep alive, keep him alive in Islam, and whoever You cause to die, cause him to die with faith. O Allaah, forgive him and have mercy on him, keep him safe and sound and forgive him, 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. O Allaah, give him a house better than his house and a family better than his family. O Allaah, 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. O Allaah, do not deprive us of the reward and do not cause us to go astray after this).”
Dua to be recited for a Child
This supplication is made when the deceased is a baby/child (i.e. one not having reached the age of puberty). When the prayer is offered for a child, there should be no prayer for forgiveness, and it should not be said in the prayer “Allaahumma aghfir lahu (O Allaah forgive him),” because no sins were recorded for him. Rather prayers should be said for forgiveness and mercy for his parents.
اللهُـمِّ اجْعَلْـهُ فَرَطـاً وَذُخْـراً لِوالِـدَيه، وَشَفـيعاً مُجـاباً، اللهُـمِّ ثَـقِّلْ بِهِ مَوازيـنَهُما، وَأَعْـظِمْ بِهِ أُجـورَهُـما، وَأَلْـحِقْـهُ بِصالِـحِ الـمؤْمِنـين، وَاجْعَلْـهُ في كَفـالَةِ إِبْـراهـيم، وَقِهِ بِرَحْمَـتِكَ عَذابَ الْجَـحيم
Allâhumma j’alhu faratan wa dhukran li-wâlidayhi, wa shafî’an mujâban. Allâhumma thaqqil bihi mawâzînahumâ, wa a’zim bihi ijûrahumâ, wa alhiqhu bi-sâlihi-l-mu’minîna. Wa j’alhu fî kafâlati Ibrâhîma, wa qihi bi-rahmatika ‘adhâba-l-jahîm.
‘O Allah, make him a preceding reward and a stored treasure for his parents, and an answered intercessor. O Allah, through him, make heavy their scales and magnify their reward. Unite him with the righteous believers, place him under the care of Ibraheem, and protect him by Your mercy from the torment of Hell.’
Women are allowed to attend the funeral Prayer
Praying the janaazah (funeral) prayer is prescribed for both men and women, because the Prophet ﷺ said the reward for it is two qeeraats. (hadeeth mentioned at the start of the class)”.
But women should not follow the funeral procession to the graveyard, because they are not allowed to do that, as it was reported in al-Saheehaynthat Umm Salamah (may Allaah be pleased with her) said: “We were forbidden to follow the funeral procession but it was not made absolute on us.” (narrated by Muslim). But women are not forbidden to offer the janaazah prayer, whether it is offered in the mosque, in a house or in a prayer-place. Women used to offer the janaazah prayer with the Prophet ﷺ in his mosque and after his lifetime.