Section I: The Ruling of Praying over the Deceased and Related Rulings

First: Ruling of praying over the deceased
1. Ruling of praying over a deceased who is present:
Prayer upon the deceased present Muslim is a communal obligation. Consensus has been quoted over this by Ibn Hazm, al-Nawawi, Ibn al-Mulaqqin, and al-Kamal ibn al-Humam.
2. Ruling of praying over a deceased who is absent:
The prayer of the absent is legislated for the deceased for whom no prayer has been performed. This is a narration from Ahmad, as well the choice of al-Khattabi, Ibn Taymiyyah, Ibn al-Qayyim, Ibn `Uthaymin, and al-Albani.

Second: Ruling of praying over some of the deceased
Scholars have differed over praying over some of the deceased if he has not been prayed over, and this is according to two views:
The first: It is that if some of the deceased is found then he is washed and prayed upon, with no difference between small and large parts. This is the position of the Shafi`is, Hanbalis, [689] Hanbalis excepted from this: hair, teeth, and nails. the position of Ibn `Uthaymin, and the verdict of the Permanent Committee.
The second: It is that no prayer is performed over the deceased unless most of him is found, and this is the position of the Hanafis, [690] For them, the deceased is not prayed upon unless most of him is present, or half of him with the head. and the Malikis.

Third: Praying upon the miscarriage
1. Ruling of praying upon the miscarried baby if he cried:
Prayer is performed upon a baby who cried [691] Istihlal of the baby is when he cries upon being born. before passing. This is by agreement of the four schools of jurisprudence.
2. Ruling of praying over the miscarried baby if he did not cry and was younger than four months
Prayer is not performed over a miscarried baby who did not cry and passed away when younger than four months. This is by agreement of the four schools of jurisprudence.
3. Ruling of praying over the miscarried baby if he did not cry but was older than four months
Scholars have differed over praying over the miscarried baby if he did not cry but was older than four months. This is according to two views:
The first: It is that prayer is not performed over him. This is the position of the majority: Hanafis, Malikis, Shafi`is, and the position of some of the Salaf.
The second: It is that he is prayed over. This is the position of the Hanbalis, the jurists of the scholars of Hadith, some of the Salaf, and the choice of Ibn Baz and Ibn `Uthaymin.

Fourth: Praying over those who committed major sins
It is haram to not pray over those who have committed major sins from the Muslims. This is the overall summarised position. [692] There is difference among the scholars with regards to those who fight the state, the woman who passes away from adulterous postnatal bleeding, the stoned to death, and the one who committed suicide. Consensus has been quoted on this matter by: al-Qadi `Iyad, Ibn `Abd al-Barr, al-Qurtubi, and al-Shawkani.

Fifth: Praying over the innovator
The funeral prayer is still performed over the innovators of the Muslims. This is by agreement of the four schools of jurisprudence, [693] Hanafis did not explicitly mention the innovator, but they stated that all Muslims are prayed upon except transgressors, bandits, and those in their legal state. Malikis stated that it is makruh for the imam of the Muslims and those of righteousness to pray upon them. As for Shafi`is, we were unable to find a text from their books in this regard, but what is mentioned is that there are three conditions for the funeral prayer: that it is prayed upon a dead, Muslim, non-martyr. Based on this, the innovator is prayed upon. the position of the majority of jurists, and the position of a group of the Salaf.

Sixth: Prayer over the disbeliever

Praying over the disbeliever is haram. Consensus has been quoted on this matter by al-Nawawi and al-Kasani.

Seventh: Funeral prayer when the dead of the Muslims are mixed with the dead of the disbelievers
If the dead of the Muslims have been mixed with the dead of the disbelievers without a way of discerning between them, then it is wajib to wash all of the deceased and pray over them. This is regardless whether the number of Muslims is greater or less than the disbelievers. This is the position of the majority: Malikis, Shafi`is and Hanbalis, as well as the position of Dawud al-Zahiri.

Eighth: Prayer over the martyrs
1. Praying over the martyred in battle:
There is no prayer over the one martyred in battle. [694] This is the one who died for one of the reasons of battle before it is concluded. This is the position of the majority: Malikis, Shafi`is, Hanbalis, and a group from the Salaf.
2. Prayer over the martyr who was not killed:
Prayer is performed over the martyr who died through other means than being killed. This includes the one who died from a stomach disease, from the plague, the drowned, the burnt to death, and the one who died under the debris of a falling building. Consensus has been quoted over this by: Ibn Qudamah, al-Nawawi, and al-Shawkani.
3. Prayer over the unjustly killed:
Prayer is performed over the one who has been unjustly killed. This is the position of the majority: Hanafis, Malikis, Shafi`is, and a narration from Ahmad.

Ninth: Times when the funeral prayer is not performed
1. Ruling of the funeral prayer after fajr and `asr:
The funeral prayer may be performed after fajr and `asr prayers. Consensus has been quoted on this by: al-Shafi`i, Ibn al-Mundhir, al-Nawawi, Ibn Qudamah, al-`Iraqi, and Zakariyya al-Ansari.
2. Ruling of the funeral prayer during sunrise, sunset, and its zenith:
Scholars have differed over the ruling of the funeral prayer during sunset, sunrise, and when the sun is at its highest [695] It is only makruh if there is no fear over the body denaturing or decaying. If there is, then the prayer is performed regardless. according to two views:
The first: It is that it is permissible during the times of prohibition. This is the position of the Shafi`is, a narration from Malik, a narration from Ahmad, and the position of some of the Salaf. It is also the choice of Ibn Hazm, Ibn Taymiyyah, Ibn `Uthaymin, and the verdict of the Permanent Committee.
The second: It is that the funeral prayer is not prayed during those times. This is the position of the majority: Hanafis, Malikis, [696] Other than the time of zenith, because it is not a makruh time for the Malikis, in which case it is permissible to pray in it. Hanbalis, and the position of the majority of scholars.

Tenth: Funeral prayer in the mosque
It is permissible to perform the funeral prayer in the mosque. This is the position of the Shafi`is, Hanbalis, and some of the Salaf. It is also the choice of Ibn al-Mundhir, Ibn Hazm, Ibn Baz, and Ibn `Uthaymin.

Eleventh: Prayer at the grave after burial
1. The deceased who is buried before being prayed upon:
Prayer is performed at the grave of the deceased who was buried without being prayed upon. This is the position of the majority: Hanafis, [697] Hanafis conditioned for praying over the grave that the deceased is yet to break apart and split up, since it is permissible to pray upon the body, not body parts. the most common position among Malikis, the position of the Shafi`is, a narration from Ahmad that was chosen by some of his companions.
2. Ruling of the funeral prayer over a grave for the one who missed it:
Whoever missed the funeral prayer before burial, then he may pray over the deceased at his grave. This is the position of the Shafi`is, Hanbalis, Zahiris, some Malikis, the majority of scholars, people of hadith, and some of the Salaf. It is also the choice of Ibn al-Mundhir, Ibn `Abd al-Barr, Ibn Taymiyyah, and Ibn al-Qayyim.
3. Ruling of the funeral prayer at the grave for the one who has already prayed it:  [698] This will be discussed when considering the ruling of repeating the funeral prayer.
4. Period of time for which the funeral prayer is legislated at the grave:
The funeral prayer is legislated at the grave of the deceased [699] Ancient graves may not be prayed upon by consensus, quoted by Ibn `Abd al-Barr. indefinitely. This is the position of the Shafi`is [700] For them, the most correct opinion is that it is legislated for those it was obligatory upon when the deceased passed away. and Ibn Hazm. It is the choice of Ibn al-Qayyim, al-San`ani, and Ibn `Uthaymin.

Twelfth: Multiplicity of the deceased in the funeral prayer
1. A single prayer for multiple deceased:
If there is more than one funeral procession, it is permissible to either pray a single prayer over all the deceased, or one prayer over each. This is by agreement of the four schools of jurisprudence.
2. Arrival of more processions after the initiation of the prayer:
If more processions with their deceased arrive at a funeral where the prayer has already been initiated, then they should wait until that funeral prayer is concluded over its deceased, then another prayer would be held for those newly arrived. This is the position of the majority: Hanafis, [701] There are details they gave pertaining to this. Malikis, and Shafi`is.

Thirteenth: Ordering the bodies of the deceased for the prayer
1. If the deceased are of different genders:
In the occasion where there are multiple deceased to be prayed upon and they are of different genders, then the men are placed first, closest to the imam, then the boys, then hermaphrodites, then women. This is by agreement of the four schools of jurisprudence, and it is the position of some of the Salaf.
2. If the deceased are the same gender:
If there are many deceased to be prayed upon, and they are all the same gender, then the best of them is placed first, closest to the imam. This is by agreement of the four schools of jurisprudence. [702] There is minimal difference among them regarding the order of the bodies.

Fourteenth: Repeating the funeral prayer
Scholars have differed over repeating the funeral prayer over two views:
The first: It is that whoever prays over a deceased may not repeat his prayer over him, and this is by agreement of the four schools of jurisprudence. [703] Hanafis explicitly mentioned prohibition, while the majority hold that it is makruh and not mustahabb.
The second: It is that he may repeat the funeral prayer over a deceased with another congregation. This is a position among Shafi`is, a position among Hanbalis, and it is the choice of Ibn Taymiyyah and Ibn Baz.

Fifteenth: Ruling of praying the funeral prayer in congregation
It is not a condition for the funeral prayer that it is performed in congregation, and solely one person performing uplifts its obligation. This is the position of the majority: Hanafis, Shafi`is, Hanbalis, and a position among Malikis.

Sixteenth: Those with most right to lead the funeral prayer
1. Those with most right to pray over the deceased:
His trustee [704] The trustee is the entrusted with praying over the deceased when he was alive. is the one who has most right to pray the funeral prayer upon the deceased. [705] Some scholars excepted the imam of the mosque. This is the position of the Malikis, Hanbalis, a position among Shafi`is, some of the Salaf, and Ibn Hazm.
2. The ruler has more right to pray over the deceased than the guardian of the deceased:
The ruler is given priority to lead the prayer over the guardian of the deceased. This is the position of the majority: Hanafis, Malikis, Hanbalis, the old Shafi`i position, and it is the position of some of the Salaf and the majority of scholars.

Seventeenth: Women praying over the deceased
1. Ruling of a woman's prayer over the deceased:
The funeral prayer is legislated for women. This is by agreement of the four schools of jurisprudence.
2. Congregation of women:
If there are only women present for the funeral prayer, then it us wajib for them to pray over the deceased, and the obligation is lifted through that. This is by agreement of the four schools of jurisprudence.

Eighteenth: Ruling of the late attendee 
1- Making up of the late attendee:
Scholars have differed over the making up of the one who joins the funeral prayer late according to two views:
The first: It is that he makes up what he misses after the imam's taslim, and his prayer is invalid without doing so. [706] If the body is removed while he is making up what he missed, then for the Shafi`is his prayer is valid and he completes it. For the Malikis, it becomes prayer over the absent deceased (gha’ib), and for the Hanafis it is invalid. This is the position of the majority: Hanafis, Malikis, Shafi`is, some of the Salaf, and the choice of Ibn al-Mundhir and Ibn Hazm.
The second: It is that it is mustahabb that he makes up what he missed of the prayer. If he fears the deceased would be taken away as he is making it up, he says Allahu Akbar without the required utterances. If he performs taslim and did not make up what he missed, his prayer is valid. This is the position of the Hanbalis, some of the Salaf, and Ibn `Uthaymin.
2. The one who joined late and saying Allahu Akbar:
The one who joined late and only reached some of the prayer should not wait for the next Allahu Akbar, and should make up his own missed ones immediately. This is the position of the Shafi`is, a position among Malikis, the position of some of the Salaf, and the position of Abu Yusuf from the Hanafis. It is also the choice of Ibn al-Mundhir, Ibn Hazm, and Ibn `Uthaymin.