روضة RawdahLibrary of How to Muslim
  1. Rawdah
  2. Articles
  3. How to ask Allah for a good ending (husn al-khatimah): du'as the Companions made

Du‘a and dhikr

How to ask Allah for a good ending (husn al-khatimah): du'as the Companions made

Deeds are judged by how they end, so the early Muslims asked for a good ending all their lives, and worked for it too.

The surest du'a for a good ending is the one in the Qur'an: "Cause me to die a Muslim and join me with the righteous" (Yusuf 12:101), alongside the Prophet's ﷺ frequent du'a, "Ya muqallib al-qulub, thabbit qalbi 'ala dinik": O Turner of hearts, make my heart firm on Your religion. The Companions added their own words, and paired them with a life that pointed the same way.

We drew this from our chapter notes on Prayers of the Pious, a book of thirty du'as whose strongest cluster is about how the early Muslims asked to end well.

Why endings matter so much

After a man who fought fiercely for the Muslims took his own life when wounded, the Prophet ﷺ said a person may seem to do the deeds of the people of Paradise yet be of the people of the Fire, and the reverse, and that "deeds are judged by their endings" (Sahih al-Bukhari 6493 and 6607).

It is a reason to keep going, not to despair, and never to look down on someone still on the way.

Du'as for a good ending from the Qur'an and Sunnah

Start with these, which come from revelation:

  • To die in submission. Yusuf, at the height of his worldly success, asked: "Cause me to die a Muslim and join me with the righteous" (12:101). See it among our Qur'anic du'as and in the Surah Yusuf mind map.
  • That the heart not swerve. "Our Lord, do not let our hearts deviate after You have guided us, and grant us mercy from Yourself" (Ali 'Imran 3:8).
  • To die with the righteous. "Our Lord, forgive us our sins, remove from us our misdeeds and cause us to die with the righteous" (Ali 'Imran 3:193).
  • For a firm heart. Anas reported that the Prophet ﷺ often said "Ya muqallib al-qulub, thabbit qalbi 'ala dinik." Asked if he feared for them, he said hearts are between two of the fingers of Allah, who turns them as He wills (Jami' at-Tirmidhi 2140, graded sahih by al-Albani; Zubayr 'Ali Za'i graded this chain weak and the hadith sahih through supporting reports, except the question "do you fear for us?", which he found no sound support for). A close wording is in Sahih Muslim 2654: "O Turner of hearts, turn our hearts to Your obedience."
  • For the highest garden. "When you ask Allah, ask Him for al-Firdaws," the highest part of Paradise (Sahih al-Bukhari 2790).

The du'as the Companions made

These are the Companions' own words, not the Prophet's ﷺ: beautiful to borrow, but not Sunnah in the same sense.

Abu Bakr: "make the best of my days the day I meet You." The book opens with Abu Bakr asking that his life's end be its best part, and his best day the day he meets Allah (ch. 1). We could not trace a chain to Abu Bakr. The same words appear in the Bedouin report below, and as the Prophet's ﷺ du'a in a report al-Haythami judged weak (Majma' az-Zawa'id 16974). The meaning is sound; do not quote it as a proven hadith.

'Umar: martyrdom in Madinah. 'Umar prayed, "O Allah, grant me martyrdom in Your cause, and let my death be in the city of Your Messenger" (Sahih al-Bukhari 1890). Both seemed unlikely, and both were answered: he was stabbed while leading Fajr (ch. 5). The Prophet ﷺ said whoever sincerely asks Allah for martyrdom is raised to the rank of the martyrs even if he dies in his bed (Sahih Muslim 1909).

Ibn Mas'ud: faith that never turns back. The Prophet ﷺ heard Ibn Mas'ud praying and said, "Ask, and you will be given." He was asking for faith that never turns back, delight that never runs out, and the Prophet's ﷺ company in the highest garden of eternity (Musnad Ahmad 4255, sahih through supporting reports per the Darussalam edition; al-Mustadrak 1949, chain sahih per al-Hakim, though its modern editors note a break in that chain). See ch. 6. Rabi'ah ibn Ka'b asked for the same company and was told to help with it through many prostrations (Sahih Muslim 489).

'Umar weeping in tawaf. Abu 'Uthman an-Nahdi heard 'Umar say while circling the Ka'bah: if You have written me among the blessed, keep me there, and if You have written sin and wretchedness on me, erase it and write me among the blessed, for You erase and confirm what You will (at-Tabari, Jami' al-Bayan, on 13:39). Promised Paradise, he never took it for granted (ch. 28).

The book also tells of Hudhayfah ibn al-Yaman dying with "You know that I love You" (ch. 7) and Abdullah ibn Sa'd ibn Abi Sarh dying just after Fajr, as he had asked (ch. 21). We have not traced those two reports, so read them as the book's account.

Read with care

  • The Bedouin. At-Tabarani (al-Mu'jam al-Awsat 9444) reports a Bedouin whose praise of Allah earned a gift from the Prophet ﷺ, ending with a request for a good ending (ch. 17). Al-Haythami said its narrators are those of the Sahih apart from one who is reliable (Majma' az-Zawa'id 17267). A sound chain is not the end of the matter, so treat it as a lesser report than the Qur'anic and sahih du'as above.
  • The "erase me" du'a. Ibn Mas'ud's version has a broken chain, as Abu Qilabah never met him (Majma' az-Zawa'id 17436). 'Umar's comes through Abu 'Uthman an-Nahdi.
  • "Allahumma ahsin 'aqibatana fil-umuri kulliha." Musnad Ahmad 17628 has it, but the Darussalam editors do not count one narrator, Ayyub ibn Maysarah, among the reliable, and note that Busr ibn Artah's Companionship is disputed. Say it as your own du'a, not as established Sunnah.

What they did alongside the du'a

The Companions did not ask and then wait. 'Umar asked sincerely for martyrdom. Ibn Mas'ud was heard while praying. Rabi'ah was told to earn his request with sujud. And 'Umar, promised Paradise, wept in tawaf anyway. Behind it all was longing for the Prophet ﷺ, as our notes on Meeting Muhammad, ch. 29 and 30 and the story of his passing show.

Habits you can start today

As for signs of a good ending, scholars mention some, such as dying with the shahadah on one's lips, but they are for hope, not for judging anyone. Leave every ending to Allah, and work on your own.

Common questions

What is the best dua for a good ending in Islam?

The strongest are from revelation: Yusuf's du'a, "Cause me to die a Muslim and join me with the righteous" (12:101), the du'a in 3:8 that hearts not swerve after guidance, and the Prophet's ﷺ frequent "Ya muqallib al-qulub, thabbit qalbi 'ala dinik" (at-Tirmidhi 2140, sahih per al-Albani). The Companions' own du'as can be added, but they are their words, not the Prophet's ﷺ.

Why are deeds judged by their endings?

The Prophet ﷺ said that a person may seem to do the deeds of the people of Paradise yet end otherwise, and the reverse, and that deeds are judged by their endings (Sahih al-Bukhari 6493, 6607). It teaches humility about one's own state, hope for others, and the need to keep asking Allah for steadfastness until the very end.

Is "Allahumma ahsin 'aqibatana fil-umuri kulliha" authentic?

It is recorded in Musnad Ahmad 17628, but its chain is not established by the Darussalam editors' assessment: they do not count one narrator, Ayyub ibn Maysarah, among the reliable, and the Companionship of the reporter, Busr ibn Artah, is disputed. Its meaning is good, so you may use it as a personal du'a, but it should not be presented as established Sunnah.

What can I do today to work towards a good ending?

Pair the du'a with deeds, as the Companions did. Ask daily for a firm heart, guard Fajr and pray a little at night, write your will, end each day with istighfar, and ask Allah for al-Firdaws (Sahih al-Bukhari 2790). Whoever sincerely asks for martyrdom reaches its rank even dying in bed (Sahih Muslim 1909).

Sources

  • Qur'an, Yusuf 12:101, https://quran.com/12:101
  • Qur'an, Ali 'Imran 3:8, https://quran.com/3:8
  • Qur'an, Ali 'Imran 3:193, https://quran.com/3:193
  • Qur'an, ar-Ra'd 13:39, https://quran.com/13:39
  • Sahih al-Bukhari 6493 and 6607 (deeds are judged by their endings), sahih, https://en.tohed.com/hadith/bukhari/6493 and https://en.tohed.com/hadith/bukhari/6607
  • Jami' at-Tirmidhi 2140 ("Ya muqallib al-qulub"), sahih per al-Albani; chain weak but hadith sahih through supporting reports, except the phrase "do you fear for us?", per Zubayr 'Ali Za'i, https://en.tohed.com/hadith/tirmidhi/2140
  • Sahih Muslim 2654 ("O Turner of hearts, turn our hearts to Your obedience"), sahih, https://en.tohed.com/hadith/muslim/2654
  • Sahih Muslim 1909 (sincerely asking for martyrdom), sahih, https://en.tohed.com/hadith/muslim/1909
  • Sahih al-Bukhari 1890 ('Umar's du'a for martyrdom in Madinah), sahih, https://en.tohed.com/hadith/bukhari/1890
  • Sahih al-Bukhari 2790 (ask for al-Firdaws), sahih, https://en.tohed.com/hadith/bukhari/2790
  • Sahih Muslim 489 (Rabi'ah ibn Ka'b asks for the Prophet's ﷺ company in Paradise), sahih, https://en.tohed.com/hadith/muslim/489
  • Musnad Ahmad 4255 (Ibn Mas'ud's du'a), sahih through supporting reports, this chain hasan because of 'Asim, per the Darussalam edition, https://en.tohed.com/hadith/musnad-ahmad/4255
  • al-Hakim, al-Mustadrak 1949 (Ibn Mas'ud's du'a), chain sahih per al-Hakim; editors note a break in this chain but grade the hadith sahih, https://en.tohed.com/hadith/mustadrak-hakim/1949
  • Musnad Ahmad 17628 ("Allahumma ahsin 'aqibatana"), narrators reliable except Ayyub ibn Maysarah, Busr ibn Artah's Companionship disputed (Darussalam), https://en.tohed.com/hadith/musnad-ahmad/17628
  • al-Haythami, Majma' az-Zawa'id 16974 ("make the best of my life its end", attributed to the Prophet ﷺ), weak (Abu Malik an-Nakha'i), https://en.tohed.com/hadith/majma-al-zawaid/16974
  • al-Haythami, Majma' az-Zawa'id 17267 (the Bedouin's praise, from at-Tabarani, al-Mu'jam al-Awsat 9444), narrators reliable per al-Haythami, https://en.tohed.com/hadith/majma-al-zawaid/17267
  • al-Haythami, Majma' az-Zawa'id 17436 (the "erase me" du'a from Ibn Mas'ud), chain broken, https://en.tohed.com/hadith/majma-al-zawaid/17436
  • at-Tabari, Jami' al-Bayan, commentary on 13:39, reports 20478 to 20481 ('Umar's du'a in tawaf via Abu 'Uthman an-Nahdi), https://quran.com/ar/13:39/tafsirs/ar-tafsir-al-tabari

More articles

Keep climbing

Grow in your knowledge of Islam

Five places to go next, from a page you can read today to a full course.