It is an agreed upon juristic ruling that if two duties coincide as to performance, concerns of the priority of ranks are to be considered. Hence, when a funeral prayer coincides with one of the five prescribed prayers, the prescribed prayer is to be given priority over the funeral prayer.
However, the Hanbali school made an exception when the funeral prayer coincides with Al`Asr or Al-Fajr prayers. The Hanbali scholars say, in these cases the funeral prayer is to be performed first, lest it be offered at a time in which it is disliked to offer prayer [if delayed until after performing Al`Asr or Al-Fajr prayers].
It must be noted however, that this is a controversial issue regarding Al-`Asr and Al-Fajr prayers, therefore there should be no criticism against following either opinion.
In The Kuwaiti Encyclopedia of Jurisprudence it is stated that: “When two duties coincide as to performance, concerns of priority of ranks are to be considered. In this regard, individual duties are to be given priority over collective ones. [Since the funeral prayer is a collective duty] if a pilgrim is circumambulating the Ka`bah, for instance, he is not to interrupt this in order to offer a Funeral prayer. Likewise, if a Friday prayer coincides with a Funeral prayer and the time is short, the Friday prayer is to be given priority. A similar case is when a person wants to go to jihad and his parents object. In such a case, obeying the parents is given priority to performing jihad, because obeying them is an individual duty, while jihad is a collective one. At the same time, this does not apply when one wants to perform pilgrimage, while one’s parents do not agree [for pilgrimage is a once-in-a-life time individual duty upon a legally responsible Muslim who is physically and financially able to perform it]” It is not disliked that a funeral prayer be offered after performing Al-Fajr or Al-`Asr prayers, nor is it disliked to offer it at the break of dawn before the call to Al-Fajr prayer or after sunset before the call to Al-Maghrib prayer. However, it is better to begin after sunset with performing Al-Maghrib prayer, followed by the funeral prayer, which are followed by the confirmed optional prayers after Al-Maghrib.
According to Helyat-Al-awliya’ (an important reference book), the fatwa to be followed [in this regard] is to delay offering the funeral prayer until the optional prayer after the Friday prayer has been performed, and this also applies to the confirmed optional prayer after Al-Maghrib. `Uqba ibn ‘Amir reported: ‘There were times when Allah’s Messenger (peace and blessings be upon him) forbade us to pray, or bury our dead: When the sun begins to rise until it has fully risen, when the sun is at its height at midday until it passes over the meridian, and when the sun draws near to setting until it sets.’ Ibn Al-Mubarak (d. 181/799) said: ”The words ‘or bury our dead’ in this hadith refers to offering the funeral prayer. According to him, Abu Hanifa, Malik, and Imam Ahmad, it is disliked to offer the funeral prayer at the times referred to in the above hadith.
On this point, the opinion of the Ash-Shafi`i school is, if burying the dead took place at one of these times without the people’s doing so on purpose, there is no blame on them. According to the Ash-Shafi`i school, the forbiddance mentioned in the hadith applies to the prayers that have no cause.
It is stated in Al-Mughni by Ibn Qudamah Al-Hanbali (d. 620/1223) that: ‘The funeral prayer is to be offered first when it coincides with Al-Fajr prayer, but if it coincides with Al-Maghrib prayer, the latter is to be given priority.”
In conclusion, if a funeral prayer coincides with one of the five prescribed prayers, the prescribed prayer is to be given priority with exception to Al-Fajr and Al-`Asr prayers, for it is forbidden to offer prayers after them [as referred to in the above hadith]. Imam Ahmad and Ibn Sireen were reported to have adopted a similar point of view.
It was also reported that Mujahid, Al-Hassan, Sa`id ibn Al-Musayib, and Qatadah were of the opinion that the prescribed prayer is to be given priority over the performance of the funeral prayer, for the prescribed prayer is more important and easier, while the funeral prayer and burying the dead takes time. If the funeral prayer and burying the dead were to be done before the prescribed prayer, this may result in missing that prayer. Also, there is no use in offering the funeral prayer first and delaying the burial of the body until after performing the prescribed prayer. However, with regard to Al-Fajr and Al-`Asr prayers, the funeral prayer is to be given priority, lest it falls in the times in which it is disliked to pray if they are delayed until a later time.