The consensus of the scholars is that prayer upon the deceased is a highly recommended act. The Prophet (Peace and salutations be upon him) said as narrated by Abu Huraira:
“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.” [Saheeh al-Bukhari, Volume 2, hadith 410]
«من شهد الجنازة حتى يصلي فله قيراط ، ومن شهد حتى تدفن كان له قيراطان. قيل: وما القيراطان؟ قال: مثل الجبلين العظيمين» رواه البخاري
The scholars further explain that the ruling of Salatul Janaaza is Fard Kifayyah (Collective obligation). Hence some scholars state that if you know of a Janaaza where nobody has prayed upon it, you should perform the Janaaza prayer upon the absent. The Prophet (Peace and salutations be upon him) performed the Janaaza prayer upon Najashee in his absence.
Jabir bin ‘Abdullah narrates: The Prophet said, “Today a pious man from Ethiopia (i.e. An Najashee) has expired, come on to offer the funeral prayer.” (Jabir said): We lined up in rows and after that the Prophet led the prayer and we were in rows. Jabir added, I was in the second row.” [Reported by Muslim].
«مات اليوم عبد لله صالح. أصحمة فقام فأمنا وصلى عليه» رواه مسلم
It was in fact one of the miracles of the Prophet (Peace and salutations be upon him) that he was able to inform the Companions of the death of an-Najashee on the very day of his death.
Abu Hurairah narrates: “Allah’s Apostle informed (the people) about the death of An-Najashee on the very day he died. He went towards the Musalla (praying place) and the people stood behind him in rows. He said four Takbirs (i.e. offered the Funeral prayer).” [Saheeh al-Bukhari, Volume 2, hadith 337].
«أن رسول الله صلى الله عليه وسلم نعى النجاشي في اليوم الذي مات فيه، وخرج بهم إلى المصلى، فصف بهم، وكبر عليه أربع تكبيرات» رواه البخاري
The questions then arise, what is the essence of Salatul Janaaza? Is it a salah or is it a form of dua? If we consider it a prayer then all the associated conditions of prayer apply. However there are a few scholars who consider this prayer to be a form of dua, due to the absence of ruku’ or sujood, and the fact that the dua in salatul Janaaza is a pillar of salatul Janaaza.
However the Prophet (Peace and salutations’ be upon him) prayed the Janaaza in a state of wudhu, he faced the ka’bah, he began the salah with a takbeer and ended it with tasleem hence for all intensive purposes we should consider it a salaah with some differences to the normal 5 daily salaah. There is a narration of Ibn Umar that the salatul Janaaza commenced so he made Tayamum and joined the prayer. This does suggest that salaatul Janaaza is not obligatory because if it was he would not have made Tayamum in this manner.
Salatul Janaaza has conditions:The Scholars of the Hanafi School believe the body of the deceased must be present. The majority of the scholars however believe this not to be a condition due to the narration of the Prophet (Peace and salutations be upon him) praying Janaaza over Najashee in his absence. In terms of the arkaan (pillars), most of the scholars believe there should be at least 4 takbeerat, Al-faatihah, Salah upon the Prophet (Peace and salutations be upon him) and some form of dua. All scholars agree that Janaaza must be prayed in a standing position if the person is able to do so.
There are some differences amongst the scholars whether some aspects of the Janaaza prayer is a rukn while others consider it a shart (condition) but this is largely a difference in terminology. Similarly some scholars consider niyyah (intention) to be a rukn while others consider it a shart. In many cases you will find the Hanbali and Shafiee school of thought agree on the rukn of ibaadat. Hence in summary the Janaaza prayer consists of:
The beginning of Salatul Janaaza is the takbeer in a standing position. According to the vast majority of scholars there is no recitation of dua al-Istiftaa (Opening supplication). In these matters it is better to follow the consensus or vast majority of the scholars. If the majority is a simple majority it is better to follow the safer opinion. For example in a matter where there is difference whether the action is Obligatory or Highly recommended it is better to do it. In a matter where there is a difference if the action is disliked or prohibited it is better not to do it.
The Maliki school of thought believes it is makrooh to recite al-Faatihah while the Hanaabilah and Shafieeah believe it is a rukn. Sheikh al-Islam Ibn Taymiyyah said it was Sunnah. In matters of fiqh where difference of opinion exists, the principle of ‘Muraat al-Khilaaf’ is useful in navigating your way through the differences which exist. ‘Muraat al-Khilaaf’ means to look at the end consequences of the different opinions and see what the practical consequences are. In many cases where difference occurs between the scholars, you will find there is a limited practical consequence of this difference. A research paper entitled ‘Muraat al-Khilaaf’ by some of the Maliki scholars considers that it is the safer option to recite al-Faatihah, however if you miss al-Faatihah you don’t need to make it up. Some may accuse that this principle tends to over simplify issues of disagreement. However if we start off by considering the practical consequences of the khilaaf we may come to the conclusion that the disagreement has no practical consequences. By approaching Fiqh from this angle you will not be obsessed with the mechanical aspects of acts of worship giving you more time to concentrate on the spiritual aspects of the worship. For example some people are so obsessed with whether there hands have reached their ear lobes when making takbeer that they concentrate very little on the khushoo’ (tranquillity and submissiveness of the prayer).
After reciting al-Fatihah the second takbeer is made. Ibn Umar used to raise his hands with each takbeer. Some scholars state that it is not Sunnah because there is no narration of the Prophet (Peace and salutations be upon him) regarding raising his hands. Next, Salah alan-Nabi is recited. The evidence for this is the statements of the Tabiee Abu Umamah. Ash-Shabi also described the Janaaza prayer more explicitly.
The question arises, is it necessary to say the whole salah on the the Prophet (Peace say and salutations be upon him)? The minimum is to say ‘Allahumma Sali ala Muhammad’, just as in the prayer. The preferred salah is the salah ibraheemia. There is no evidence to differentiate that salah alan-Nabi mentioned in the Janaaza prayer is any different to the 5 daily prayers. Next after the 3rd takbeer we make dua. As Ibn al-Qayim mentioned the most important pillar of Janaaza is to make dua. This is the aim of salaatul Janaaza. Abu Hurayrah narrates that the Prophet (Peace and salutations’ be upon him) said: “When you pray over the dead one, be sincere in your prayer for him” [Reported by Abu Dawud].
«إذا صليتم على الميت فأخلصوا له الدعاء»رواه أبو داود
In fact what was reported concerning the dua in Salaatul Janaaza is more than what was reported regarding recitation of the Quran. Hence there is a difference of opinion regarding Surah al-Faatihah but not the dua.
Here are a selection of dua (from Hisnul Muslim) for the deceased at the Janaaza prayer:
“O Allaah, forgive and have mercy upon him, excuse him and pardon him, and make honourable his reception. Expand his entry, and cleanse him with water, snow, and ice, and purify him of sin as a white robe is purified of filth. Exchange his home for a better home, and his family for a better family, and his spouse for a better spouse. Admit him into the Garden; protect him from the punishment of the grave and the torment of the Fire.” [Reported by Muslim].
«اللهم! اغفر له وارحمه. واعف عنه وعافه. وأكرم نزله. ووسع مدخله. واغسله بماء وثلج وبرد. ونقه من الخطايا كما ينقى الثوب الأبيض من الدنس. وأبدله دارا خيرا من داره. وأهلا خيرا من أهله. وزوجا خيرا من زوجه. وقه فتنة القبر وعذاب النار» رواه مسلم
“O Allaah, forgive our living and our dead, those present and those absent, our young and our old, our males and our females. O Allaah, whom amongst us You keep alive, then let such a life be upon Islaam, and whom amongst us You take unto Yourself, then let such a death be upon faith. O Allaah, do not deprive us of his reward and do not let us stray after him.” [Reported by Abu Dawud].
«اللهم اغفر لحينا وميتنا وصغيرنا وكبيرنا وذكرنا وأنثانا وشاهدنا وغائبنا اللهم من أحييته منا فأحيه على الإيمان ومن توفيته منا فتوفه على الإسلام اللهم لا تحرمنا أجره ولا تضلنا بعده» رواه ابو داود
“O Allaah, so-and-so is under Your care and protection so protect him from the trial of the grave and torment of the Fire. Indeed You are faithful and truthful. Forgive and have mercy upon him, surely You are The Oft-Forgiving, The Most-Merciful” [Authenticated by Al-Albani].
«اللهم إن فلان بن فلان في ذمتك وحبل جوارك فقه من فتنة القبر وعذاب النار وأنت أهل الوفاء والحق فاغفر له وارحمه إنك أنت الغفور الرحيم» صححه الألباني
“O Allaah, Your servant and the son of Your maidservant is in need of Your mercy and You are without need of his punishment. If he was righteous then increase his reward and if he was wicked then forgive him.” [Reported by Ibn Al Molaqen as Saheeh].
«اللهم عبدك وابن أمتك احتاج إلى رحمتك وأنت غني عن عذابه إن كان محسنا فزد في إحسانه وإن كان مسيئا فاغفر له» رواه بن الملقن، صحيح
It was reported that the Prophet (Peace and salutations’ be upon him) was keen to pray Janaaza on the Companions when they died. Ibn Abbas narrated: “A person died and Allah’s Apostle used to visit him. He died at night and (the people) buried him at night. In the morning they informed the Prophet (about his death). He said, “What prevented you from informing me?” They replied, “It was night and it was a dark night and so we disliked to trouble you.” The Prophet went to his grave and offered the (funeral) prayer.” [Saheeh al-Bukhari, volume 2, hadeeth 339].
«مات إنسان، كان رسول الله صلى الله عليه وسلم يعوده، فمات بالليل، فدفنوه ليلا، فلما أصبح أخبروه، فقال: ما منعكم أن تعلموني. قالوا: كان الليل فكرهنا، وكانت ظلمة، أن نشق عليك، فأتى قبره فصلى عليه.» رواه البخاري
The Prophet (Peace and salutations’ be upon him) also said: “When a person dies tell me because my prayer on him is a mercy” [Authenticated by Al-Albani]
«لا أعرفن ما مات منكم ميت ما كنت بين أظهركم إلا آذنتمونى به فإن صلاتى عليه رحمة» صححه الألباني