The author An-Nawawee – may Allah shower blessings on him – said in his Book (Riyaadus- Saaliheen): 'Chapter on Supplications in Funeral Prayers.'
The funeral prayer consists of the recitation of Al-Fatihah because it entails glorification of Allah, the Honored and Glorious is He. This is followed by seeking benediction for the Prophet ﷺ, and he is the
most rightful of mankind to be given preference even over one's self. Thereafter, one supplicates for the generality saying: "Allahuma ighfir lihayyina wa mayyitina - O Allah! Forgive the living and the dead among us."(1) Then one should supplicate for the particular person, the dead, saying: 'Allahuma ighfir lahu warhamhu - O Allah! Forgive him and have mercy upon him.' This order is similar to the order in At-Tashahhud: salutation of Allah which is a glorification of Allah, then salutation upon the Prophet ﷺ, then greetings to the person and then to the righteous servants of Allah. The funeral prayer is similarly ordered except that the generality is given preference before the self. In Tashahhud, you supplicate for yourself by saying: 'As-Salamu alayna - peace be upon us,' because your soul has more right on you, relative to others with the exception of the Prophet ﷺ.
In summary, the important aspects of the funeral prayer are: a person makes the first Takbeer (saying Allahu Akbar - Allah is the Greatest) then says: 'Audhu billahi minash - shaytanir- Rajeem - I seek refuge with Allah against Satan, the accursed,' then he recites the entire Surat Al-Fatihah. Then he pronounces the second Takbeer (saying Allahu Akbar - Allah is Great) and seeks blessing and benediction upon the Prophet ﷺ. The best form is to employ what he ﷺ taught his Ummah: "Allahumma Salli ala Muhammad wa ala ale Muhammad, kama Sallaita ala Ibraheem wa ala ale Ibraheem, innaka Hameedun Majeed. Allahumma barik ala Muhammad, wa ala ale Muhammad kama barakta ala Ibraheem, wa ala ale Ibraheem, innaka Hameedun Majeed - (meaning: O Allah! Send benedictions upon Muhammad and the family of Muhammad, as you sent benedictions upon Ibraheem and the family of Ibraheem. Verily, You are Praiseworthy and Magnificent. O Allah! Bless Muhammad and the family of Muhammad, as You blessed Ibraheem and the family of Ibraheem. Verily, You are Praiseworthy and Magnificent)."(2)
Thereafter, he pronounces the third Takbeer (saying Allahu Akbar – Allah is the Greatest) and supplicates for the generality of Muslims saying: ‘O Allah! Forgive the living and the dead amongst us, the present and the absent, the young and the old.’ Then he supplicates specially for the deceased with the supplication contained in the hadeeth of Anas bin Malik - may Allah be pleased with him, for instance. He said: ‘The Prophet ﷺ offered a funeral prayer and I memorized his supplication: ‘Allahumma ighfir lahu, warhamhu, wa ‘afihi, wa’fu ‘anhu, wa akrim nuzulahu, wa wassi’ mudkhalahu, waghsilhu bil-ma’I wath-thalji wal-baradi, wa naqiaihi minal-khataya, kama naqqayta thawabal-abyada minad-danasi, wa abdilhu khairan minn alihi, wa zawjan khairan min zawjihi, wa adkhilhul-Jannata, wa a’idh-hu min adhabil-qabri, wa min adhabin-nar (meaning: O Allah! Forgive him, bestow mercy upon him, pardon him, overlook his faults, accord him a noble provision and make his grave spacious, wash him with water, snow and hail, purify him from sins as You purified the white garment from soiling, give him a better abode in place of his present one, and a better family in exchange of his present one, and a better spouse in place of his present one. Admit him into Paradise and protect him from the trial in the grave and punishment of the Hellfire.)
‘accord him a noble provision’ that is, grant him an honorable welcome and reception. This is because a dead person becomes a guest of Allah, Honored and Glorious is He, when it departs this word for the grave where he will either be punished or be in pleasure.
He also supplicates: ‘and make his grave spacious’ that is, enlarge his grave for him when he enters it.
‘Wash him with water, snow and hail,’ that is, cleanse him of his sins with water, snow and hail. He mentioned snow and hail because of their cold nature, and water because it is used for cleansing. The punishments for sins are hot, we ask Allah to save you and us from it; thus, it is appropriate to counter that with cold water and hail. So, cleansing is accomplished by the use of water and cooling is accomplished by the use of snow and hail.
‘Purify him from sins as You purified the white garment from
soiling,' that is, grant him a perfect purification from his sins as white cloth is free of dirt. He mentioned white cloth because the least amount of dirt will be noticeable on it. So, if white cloth is truly clean, it means there is no single speck of dirt on it in contrast to black, red, green or cloth of other colors. They are unlike white cloth upon which dirt is glaringly visible.
'Give him a better abode in place of his present one,' because he has departed this world to a transit world. It is well known that this world is an abode of adversity, loss and anguish, so he said: 'give him a better abode in place of his present one,' in order to be in a state of pleasure in his grave.
'and a better family in exchange of his present one,' that is, his people like his mother, aunt, daughters, father, son and so on. 'And a better spouse in place of his present one,' that is, grant him a wife better than his earthly wife by granting him the Hours of Paradise in addition to his earthly wife. When a person marries a woman in this world and his wife dies upon firm faith, then she will be one of his wives in the hereafter.
If someone were to ask: 'How does she become a better wife when she remains the same as she was in the earthly life?!' We respond that she would be better in characteristics, beauty and every other attributes.
'Admit him into Paradise and protect him from the trial in the grave and punishment of the Hellfire.' These supplications should be recited for the dead. One should be sincere to the dead in these supplications.
If the dead is female, one should say: 'O Allah! Forgive her, bestow mercy upon her, pardon her, overlook her faults, accord her a noble provision and make her grave spacious, wash her with water, snow and hail, purify her from sins as You purified the white garment from soiling...' that is, one uses the feminine pronoun. One is at liberty if one does not know the gender of the deceased; if he wishes, he may say: 'O Allah! Forgive him,' that is, forgive this person. A woman is also referred to as person. Alternatively, he may say: 'Forgive it,' that is, forgive this corpse; both male and female can be referred to as a
corpse, which requires the pronoun 'it'. If one knows the gender of the deceased, appropriate pronoun should be used in the supplication.
If one does not know the gender, then it is permissible to use either masculine or feminine pronoun. When he uses a masculine pronoun in this state, then he intends that: 'Forgive him,' that is, this person before us. Likewise, when he uses a feminine pronoun, he intends thereby: 'forgive her,' that is, forgive this corpse since this can be used to refer to both males and females.
Allah alone grants success.