Short answer
Yes. In the Hanafi school the janazah may be prayed after Fajr and after Asr, and burial at night is allowed, though daytime is better when it makes things easier. The only times to avoid are the three short moments of sunrise, the sun at its height, and sunset, unless the body was brought ready at that very moment.
The janazah is not disliked after Fajr or after Asr, since the dislike there is for voluntary prayers. At sunrise, zenith and sunset it is not prayed, except that a body brought at that very moment may be prayed over without dislike; delaying a ready body into those times is not allowed. Burial at night is permitted.
Other madhhabs
- Shafi'i
- The janazah may be prayed at any time, the three times included, because it is a prayer with a reason.
- Hanbali
- Not prayed at the three narrow times unless there is fear for the body; allowed after Fajr and after Asr.
Explanation
A death can happen at any hour, and families often ask whether they must wait for a certain time to pray or bury. Mostly they do not. The sunnah is to hurry, so the janazah is held as soon as the body is ready.
The three times. Uqbah ibn Amir reported that the Messenger of Allah ﷺ forbade praying, or burying the dead, at three times: as the sun rises until it is up, when it stands at its height until it passes, and as it sets until it has set. Hanafi scholars apply this to the janazah prayer. Each of these times lasts only a short while, so waiting is rarely a hardship.
- After Fajr and after Asr: the janazah is allowed. The dislike in these times is for voluntary prayers, and the janazah is a duty.
- Body brought at a forbidden moment: if it was ready and brought exactly then, it is prayed over straight away, without dislike, in the Hanafi school.
- Body ready earlier: do not hold it back into a forbidden moment; pray before or after.
- Night burial: allowed. The Prophet ﷺ prayed at the grave of a man who had been buried the night before. He warned against hurried night burials where the dead were poorly shrouded or not prayed over, so daytime is better when it makes the washing, kafan and attendance easier.
In practice, mosques in the UK, US and the Gulf usually hold the janazah after one of the five daily prayers, often Zuhr or Asr, so the community is present. Burial after Asr or after Maghrib is common and fine. See how soon burial must happen and how to pray janazah.
The evidence
Sahih Muslim 831
Sahih... ينهانا أن نصلي فيهن أو أن نقبر فيهن موتانا ...
"He used to forbid us from praying, or burying our dead, at these times."
These are the three short times when the janazah is not prayed.
Sahih Muslim 943
Sahih... أن يقبر الرجل بالليل حتى يصلى عليه إلا أن يضطر إنسان إلى ذلك ...
"He rebuked burying a man at night before he had been prayed over, unless someone was forced to do so."
Night burial was discouraged where it meant a poor shroud or no prayer, not banned outright.
Sahih al-Bukhari 1340
Sahih... فقالوا فلان دفن البارحة فصلوا عليه ...
"They said: so-and-so, he was buried last night. So they prayed over him."
A burial took place at night, and the Prophet ﷺ prayed at the grave.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Salah, on the disliked times. The janazah at the forbidden times and a body brought within them.
- al-Hidaya, Kitab al-Salah, section on the times when prayer is disliked. Which prayers are barred at sunrise, zenith and sunset and after Fajr and Asr.
- al-Majmu' (Nawawi), Kitab al-Salah, on the forbidden times. The Shafi'i permission for prayers with a reason at any time.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.