Dua and grief
Dua for Grief and Loss in Islam: What to Say, What the Prophet ﷺ Did
The exact words for loss, the hadith showing the Prophet ﷺ wept at his own son's death, how long mourning is actually permitted, and the three things that still reach someone after they are gone.
By Zaman Ishtiyaq, founder of Muhasaba · Updated August 16, 2026
Primary sources: Quran 2:155-156, Sahih al-Bukhari, Sahih Muslim.
The dua
إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ
Inna lillahi wa inna ilayhi raji'un — "Indeed we belong to Allah, and indeed to Him we shall return." (Quran 2:156)
Say it when you hear of a death, when you are the one grieving, or any time a loss — of a person, health, or something you relied on — strikes you. It is not a euphemism to soften bad news. It is the Quran's actual claim about what has happened: nothing was ever fully yours to lose, and the return to Allah is not the tragedy — it is the appointment.
You are here because someone died, or because you are afraid someone will. Most pages on this topic give you a list of duas to copy and move on. This page does that too — the exact Arabic, transliteration, and meaning are below — but it also tells you what the Quran and the Prophet ﷺ actually said about grief itself: whether crying is allowed, how long you are permitted to mourn, and what — concretely, not abstractly — still reaches a person once they are gone.
None of this is offered to rush you past the pain. Islam does not ask you to feel nothing. It gives you words to say when you cannot find your own, a ceiling on how long ritual mourning should visibly continue so grief does not calcify into permanent withdrawal, and a small number of concrete actions that make the loss less final than it feels.
What Islam Actually Says About Loss
The Quran does not present loss as a malfunction in an otherwise smooth plan. It names it directly as a test, in a passage revealed to a community that had already buried people it loved.
2:155. وَلَنَبْلُوَنَّكُم بِشَيْءٍ مِّنَ الْخَوْفِ وَالْجُوعِ وَنَقْصٍ مِّنَ الْأَمْوَالِ وَالْأَنفُسِ وَالثَّمَرَاتِ ۗ وَبَشِّرِ الصَّابِرِينَ — "And We will surely test you with something of fear and hunger and a loss of wealth, lives, and fruits — but give good tidings to the patient." Loss of life — al-anfus, which includes the people you love — is named specifically as one of the tests, alongside fear and hunger. It is not framed as punishment or as evidence you did something wrong.
2:156. الَّذِينَ إِذَا أَصَابَتْهُم مُّصِيبَةٌ قَالُوا إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ — "Who, when calamity strikes them, say, 'Indeed we belong to Allah, and indeed to Him we shall return.'" The very next ayah tells you what the patient actually say. It is not silence. It is not forced positivity. It is a specific sentence — the one in the box above — that states a fact rather than manages an emotion.
"Give good tidings to the patient — who, when calamity strikes them, say: 'Indeed we belong to Allah, and indeed to Him we shall return.'"
The Dua in Full, and When to Say It
"Inna lillahi wa inna ilayhi raji'un" is the minimum — say it the moment you hear news of a death, or the moment any loss lands on you, even one that is not death: a miscarriage, a diagnosis, a divorce, a job you needed. The Prophet ﷺ taught a fuller version for moments you can sit with the loss rather than just react to it:
اللَّهُمَّ أْجُرْنِي فِي مُصِيبَتِي وَأَخْلِفْ لِي خَيْرًا مِنْهَاAllahumma ajirni fi museebati wakhluf li khayran minha — "O Allah, reward me for my affliction, and replace it for me with something better."
This dua is reported from Umm Salamah, who narrated that she heard the Prophet ﷺ say whoever recites this at a calamity will have that promise fulfilled (Sahih Muslim 918). She recited it when her husband Abu Salamah died — and she would later say she wondered who could possibly be "better" than him, before Allah married her to the Prophet ﷺ himself. The dua does not ask Allah to undo the loss. It asks for two separate things: that the affliction itself be rewarded, and that whatever comes after not simply fill the space but genuinely be better.
Duas for the Person Who Has Died
Separate from the dua you say for your own grief, there is dua you make on behalf of the person who died — this is one of the few things you can still actively do for them.
اللَّهُمَّ اغْفِرْ لَهُ وَارْحَمْهُ وَعَافِهِ وَاعْفُ عَنْهُAllahumma ighfir lahu warhamhu wa 'afihi wa'fu 'anh — "O Allah, forgive him, have mercy on him, pardon him, and excuse him." (Adapt the pronoun for a woman: lahaa, warhamhaa, wa'afihaa, wa'fu 'anhaa.)
This is drawn from the funeral prayer taught by the Prophet ﷺ and recorded by 'Awf ibn Malik (Sahih Muslim 963a), where he prayed a longer version asking Allah to widen the person's grave, wash them of their sins as a white garment is washed of dirt, and grant them a home better than their home in this world. You are not limited to funeral-day recitation — this dua remains valid and beneficial for as long as you remember the person, which for most people is the rest of their own life.
Is It Allowed to Cry? The Prophet's Own Grief
Some people carry a quiet guilt that crying at a death shows weak faith or insufficient acceptance of qadr. The clearest answer to that is the Prophet ﷺ himself, at the deathbed of his own son.
Anas ibn Malik narrates that the Prophet ﷺ went in to see his infant son Ibrahim as he was dying, and the Prophet's eyes began to shed tears. 'Abd al-Rahman ibn 'Awf said, "Even you, O Messenger of Allah?" The Prophet ﷺ replied, "O Ibn 'Awf, this is mercy." Then he wept more and said: "The eyes shed tears and the heart grieves, and we will not say except what pleases our Lord. Indeed, O Ibrahim, we are grieved by your separation" (Sahih al-Bukhari 1303).
That hadith draws the actual line, and it is not between crying and not crying. It is between grief expressed honestly — tears, sorrow, saying you are grieved — and grief expressed as rebellion against Allah's decree: wailing (niyaha), striking the face or chest, tearing clothing, or speaking despair against qadr. The first is rahma — mercy, and human. The second is what the Prophet ﷺ disavowed. If you have cried at a loss and felt ashamed of it, this hadith is a direct answer: the man the Quran calls a mercy to all the worlds wept at his son's bedside, and named the tears themselves as mercy.
How Long Mourning Is Permitted
The Prophet ﷺ set an actual number, reported by Umm Habibah, one of his wives: "It is not permissible for a woman who believes in Allah and the Last Day to mourn for a deceased person for more than three days, except for a husband — four months and ten days" (Sahih al-Bukhari 5339).
Read this precisely. It does not say your grief must end in three days — feeling remains as long as it remains, and no hadith claims otherwise. What it limits is the visible, ritual expression of mourning: wearing mourning clothes, refusing adornment, withdrawing from ordinary life and obligations. That ceiling exists so grief does not become a permanent public performance that a household, a set of children, or a person's own responsibilities cannot survive. The exception — four months and ten days for a widow — is the 'iddah, a period with its own separate legal purpose (confirming she is not pregnant before remarriage is possible) that happens to align with an extended mourning allowance out of recognition that a spouse's loss carries a different weight.
In practice: if you find yourself, months later, still unable to function — not still sad, but still unable to work, parent, or maintain basic obligations — that is not a failure of sabr requiring more self-discipline. It is worth speaking to someone, religious or clinical. The three-day ritual limit was never meant as a timeline for the heart to finish healing.
What Still Reaches Someone After Death
Abu Hurairah reported the Prophet ﷺ said: "When a man dies, his deeds come to an end except for three: ongoing charity (sadaqah jariyah), knowledge from which benefit is gained, or a righteous child who prays for him" (Sahih Muslim 1631). This is the hadith to actually act on, not just read.
- ·Ongoing charity in their name. A water well, a Quran donated to a masjid, a contribution toward something that keeps producing benefit after the giving stops. This can be done at any point, not only in the days right after the funeral — and repeated whenever you have the means.
- ·Knowledge that keeps benefiting people. If the person taught, wrote, or built something others still learn from, that continues to count for them. If they did not, you can create this on their behalf — funding a class, publishing something in their memory, teaching their grandchildren what they taught you.
- ·Dua from a righteous child — or from you. Scholars note the wider principle beneath this hadith: sincere dua for the deceased reaches them regardless of who makes it. Making "Allahumma ighfir lahu warhamhu" a standing part of your own dua — after salah, not only when you happen to remember — is the simplest and most repeatable of the three.
The Reward Promised for Patience in Loss
None of the above is offered as consolation without weight behind it. Three texts, read together, make a specific promise to someone who loses a person they love and responds with sabr rather than despair.
Abu Hurairah reports Allah says, in a hadith qudsi: "I have nothing to give but Paradise as a reward to My believing slave who, if I cause his dear one to die from among the people of this world, then remains patient and seeks reward" (Sahih al-Bukhari 6424). Not a general reward — Paradise specifically, described as the only fitting payment.
The Quran adds that this reward has no ceiling: "Indeed, the patient will be given their reward without account" (39:10) — إِنَّمَا يُوَفَّى الصَّابِرُونَ أَجْرَهُم بِغَيْرِ حِسَابٍ. And the grief itself — the actual pain, not just the patience you manage to hold around it — is not wasted: "No fatigue, disease, sorrow, sadness, hurt, or distress befalls a Muslim, even the prick of a thorn, but that Allah expiates some of his sins for that" (Sahih al-Bukhari 5641). The sadness you cannot help feeling is doing work you did not have to do consciously for it to count.
What Most Dua Lists Leave Out
Most pages on this topic are a list: five duas, a short paragraph each, done. What they consistently skip is that grief in Islam is not a single event you say the right words at and then move past. It recurs — at the funeral, at the first Eid without them, at a random Tuesday eighteen months later when a smell or a song puts them back in the room. A static list of duas does not account for that recurrence. A practice does.
This is where muhasaba — the evening practice of honest self-accounting — becomes useful in grief specifically, not just generally. Muhasaba does not ask you to resolve your grief by a deadline. It asks a narrower, repeatable question each night: what did today actually hold. On a day grief resurfaces, the honest muhasaba entry is not "I am supposed to be over this by now." It is naming, in a sentence, what the day actually held — the wave that came, the dua you said in the middle of it, whether you reached for despair or for "inna lillahi wa inna ilayhi raji'un" instead. Writing it down does what a memorized dua list alone cannot: it gives you a record, over months, of the grief actually changing shape — even on the days it does not feel like it is.
A Simple Daily Practice During Mourning
You do not need a complicated routine while grieving. A short, repeatable one is more sustainable than an elaborate one you abandon after a week.
Say "Allahumma ajirni fi museebati wakhluf li khayran minha" once, deliberately, not as a reflex. Make dua for the deceased: "Allahumma ighfir lahu warhamhu."
If grief resurfaces unexpectedly, say "inna lillahi wa inna ilayhi raji'un" again. It is not only for the first news. It is valid every time the loss re-lands.
A short muhasaba entry: what today actually held, one honest sentence. Over weeks, this becomes the record that shows you the grief is moving — something that is very hard to see from inside any single day.
Frequently Asked Questions
What is the dua when someone dies in Islam?
Say "Inna lillahi wa inna ilayhi raji'un" (إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ) — "Indeed we belong to Allah, and indeed to Him we shall return" (Quran 2:156). A longer version taught by the Prophet ﷺ adds: "Allahumma ajirni fi museebati wakhluf li khayran minha" — "O Allah, reward me in my affliction and replace it for me with something better" (Sahih Muslim 918).
Is it allowed to cry when someone dies in Islam?
Yes. The Prophet ﷺ wept at the death of his own son, Ibrahim, and said, "This is mercy" (Sahih al-Bukhari 1303). What is prohibited is niyaha — ritual wailing, striking the chest or face, tearing clothes, or statements of despair against Allah's decree. Tears are permitted; performed grief that resembles pre-Islamic mourning rites is not.
How long should you mourn a death in Islam?
Three days of visible mourning for most losses, extended to four months and ten days only for a widow mourning her husband (Sahih al-Bukhari 5339). This limits ritual mourning practices — mourning dress, withdrawal from adornment and obligations — not the emotional process of grief, which has no fixed timeline in the hadith.
What can I still do for someone who has died?
Three things keep reaching them: ongoing charity given on their behalf, knowledge that continues to benefit others, and a righteous child who makes dua for them (Sahih Muslim 1631). In practice: give charity in their name, fund or create something that keeps benefiting people, and make "Allahumma ighfir lahu warhamhu" a standing part of your own dua.
What reward is promised for patience after losing someone?
Allah says in a hadith qudsi that Paradise is the reward for a believer who loses someone dear and remains patient, seeking reward (Sahih al-Bukhari 6424). The Quran adds that this reward comes "without account" (39:10), and that the grief itself expiates sin: "No fatigue, disease, sorrow, sadness, hurt, or distress befalls a Muslim... but that Allah expiates some of his sins for that" (Sahih al-Bukhari 5641).
Grief does not end in three days
A quiet place to write it down, on the days it comes back.
The Muhasaba app guides a short nightly reflection — write or speak what the day actually held, receive a relevant Quranic ayah, and keep a private record of how grief moves over time. Free on iOS.
Download on the App StoreNew to self-accounting? Learn what muhasaba al-nafs means →
On patience through hardship: Sabr in Islam — the three kinds of patience →
Looking for reflection prompts? Browse Islamic journaling prompts →