The Words for the Graveyard — Sahih Muslim 975 & 974
One chapter of Sahih Muslim carries the graveyard words three times over: a greeting he ﷺ taught, words he spoke himself at al-Baqi’ in the night, and a wording he taught ’Aisha when she asked him. The pages that rank for these words usually print one of them, or stir two together. This page keeps all three apart, each under its own number.
Short answer: The Messenger of Allah ﷺ used to teach them when they went out to the graveyard: ‘Peace be upon you, the inhabitants of the city, among the believers, and Muslims, and God willing we shall join you. I beg of Allah peace for us and for you.’ Muslim’s chapter carries three narrations; this page prints each as its own narration.
ImanAtlas does not give fatwas. For your own situation, ask a qualified scholar you trust.
Grief that stays heavy is not a failure of faith. If it stays with you day after day, please reach out as well — to family, to a trusted friend, and to a doctor or counsellor. Accepting support from people is part of looking after yourself.
The words are short, and they are usually met in a hurry — copied onto a card, or folded into a list of things to do at a grave. In Sahih Muslim they stand in one chapter, “What is to be said when entering the graveyard and supplicating for its occupants”, and the chapter carries them in three narrations, not one. There is the greeting the Prophet ﷺ used to teach his companions for when they went out to the graveyard. There is what he said himself, at the end of the night, in al-Baqi’. And there is the wording he taught ’Aisha, after she had followed him there and asked him how she should pray for them. This page prints the three narrations separately, as Muslim gives them, and blends none of them into another.
The taught greeting (Muslim 975)
Sulaiman ibn Buraida narrates from his father that the Messenger of Allah ﷺ used to teach them these words when they went out to the graveyard. Muslim’s own page shows the one narration carrying two openings: transmitted on Abu Bakr’s authority, it begins shorter — “Peace be upon the inhabitants of the city (i. e. graveyard)” — and in Zuhair’s transmission the words run fuller. The block below is the same block that stands on Duas for Parents, the Deceased & the Funeral Prayer, and it prints Zuhair’s wording.
السَّلاَمُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ لَلاَحِقُونَ أَسْأَلُ اللَّهَ لَنَا وَلَكُمُ الْعَافِيَةَ
“Peace be upon you, the inhabitants of the city, among the believers, and Muslims, and God willing we shall join you. I beg of Allah peace for us and for you.”
Sahih Muslim 975
Abu Bakr’s opening stands in Muslim’s Arabic as السَّلاَمُ عَلَى أَهْلِ الدِّيَارِ — the same shorter greeting, “Peace be upon the inhabitants of the city”. It is reported here, in this one clause, rather than stitched onto the block above, so that the two openings are never read as one composite greeting of this site’s making. One more thing the block does not carry: sunnah.com prints no transliteration for this narration, so none is placed under these words.
His own words at al-Baqi’ (Muslim 974a)
The second narration is not a teaching but a practice. ’Aisha reports that whenever it was her turn for the Messenger of Allah ﷺ to spend the night with her, he would go out towards the end of the night to al-Baqi’ — the graveyard of Madinah — and say the words in the block below: a greeting to its people, and then, inside the same narration, a prayer for them — “O Allah, grant forgiveness to the inhabitants of Baqi’ al-Gharqad”.
السَّلاَمُ عَلَيْكُمْ دَارَ قَوْمٍ مُؤْمِنِينَ وَأَتَاكُمْ مَا تُوعَدُونَ غَدًا مُؤَجَّلُونَ وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لاَحِقُونَ اللَّهُمَّ اغْفِرْ لأَهْلِ بَقِيعِ الْغَرْقَدِ
“’A’isha reported (that whenever it was her turn for Allah’s Messenger [may peace be upon him] to spend the night with her) he would go out towards the end of the night to al-Baqi’ and say: Peace be upon you, abode of a people who are believers. What you were promised would come to you tomorrow, you receiving it after some delay; and God willing we shall join you. O Allah, grant forgiveness to the inhabitants of Baqi’ al-Gharqad. Qutaiba did not mention his words:" would come to you".”
Sahih Muslim 974a · The Book of Prayer – Funerals, chapter “What is to be said when entering the graveyard and supplicating for its occupants” · in-book Book 11, Hadith 131 · English translation: Book 4, Hadith 2126 — sunnah.com prints no transliteration for this narration, so none is added
Muslim’s page itself records one transmitter’s difference here: Qutaiba, one of the men in the chain, did not mention the words “would come to you”. The greeting stands as the other transmitters carry it, and the omission is named on the source page rather than filled in silently, or dropped silently, here. This narration is also kept apart from the one above: 975 is what he ﷺ taught others to say; 974a is what he said himself.
The wording he taught ‘Aisha (Muslim 974b)
The same chapter carries a longer account, also from ’Aisha. One night she followed him, unobserved, as he went out to al-Baqi’; he stood there a long time, and when she afterwards asked him — “Messenger of Allah, how should I pray for them?” — he taught her words to say. The rest of her account — the following, and the conversation when he came back — is her story, and it is reported here in this one paragraph rather than quoted. What is quoted below is the exchange itself: her question, and the wording he gave her.
السَّلاَمُ عَلَى أَهْلِ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَيَرْحَمُ اللَّهُ الْمُسْتَقْدِمِينَ مِنَّا وَالْمُسْتَأْخِرِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لَلاَحِقُونَ
“I said: Messenger of Allah, how should I pray for them (How should I beg forgiveness for them)? He said: Say, Peace be upon the inhabitants of this city (graveyard) from among the Believers and the Muslims, and may Allah have mercy on those who have gone ahead of us, and those who come later on, and we shall, God willing, join you.”
Sahih Muslim 974b · The Book of Prayer – Funerals, same chapter · in-book Book 11, Hadith 132 · English translation: Book 4, Hadith 2127 — sunnah.com prints no transliteration for this narration, so none is added
The wording he taught her is not the wording of the two narrations above, and the difference is left standing. Where the taught greeting of 975 closes by begging Allah peace “for us and for you”, the words given to ’Aisha ask mercy “on those who have gone ahead of us, and those who come later on” — a clause the greeting does not carry. Each wording stays inside its own narration.
Three narrations, never blended
In the field, the two ’Aisha narrations are commonly run together under a single label: one library page’s second graveyard dua is cited simply as “Sahih Muslim 974”, its wording drawn from these narrations without keeping them apart. And the words are often printed inside a method for visiting — a sequence of what to do at a grave, with positions and rulings attached to the texts. This page prints no method and attaches no ruling. Three narrations, three numbers, and each wording where its own narration puts it.
The narrations themselves give no steps, no count, no ruling, and no promise about what reaches anyone.
Where these words sit
These words belong to the set gathered on Duas for Parents, the Deceased & the Funeral Prayer, where they stand among Nuh’s prayer for his parents, the funeral dua ’Awf ibn Malik memorised, and the dua said over Abu Salamah at his death. Its companion pages in this set give those duas the same treatment: The Funeral Dua He ﷺ Was Heard Praying prints Sahih Muslim 963 whole, and The Dua at the Moment of Death prints both routes of the Abu Salamah narration, with his name standing in the words. All of them stand together on Duas for Parents, the Deceased & the Funeral Prayer.
ImanAtlas does not give fatwas. For your own situation, ask a qualified scholar you trust.
Grief that stays heavy is not a failure of faith. If it stays with you day after day, please reach out as well — to family, to a trusted friend, and to a doctor or counsellor. Accepting support from people is part of looking after yourself.
Frequently asked questions
What should I say when I visit a grave?
The sources give the words in three narrations, and all three stand on this page: the greeting the Prophet ﷺ used to teach for going out to the graveyard (Muslim 975), his own words at al-Baqi’ (974a), and the wording he taught ‘Aisha when she asked (974b). Each stands under its own number, in its own section. This page does not choose one of them for you, and it does not arrange them into an order to follow — it prints what was said, as the narrations give it.
May women visit graves? How often should one go, and what else is done there?
Those are rulings — who may visit, how often, and what is done there besides the words — and rulings are not this page’s to give. Nothing on this page answers them, and nothing here leans towards an answer either: the narrations are printed, and questions about your own practice belong to a qualified scholar who can be asked in return, not to a page that only prints sources.
Is Qur’an recited at the grave for the dead?
That is a ruling question, and behind it sits a second one, about recitation done on behalf of someone who has died. Both are routed on this page, not answered. What can be said here is only what the page does: it prints no recitation programme, and it arranges nothing to be done at a grave — the three narrations above are words that were said, reported as they were said.
Which wording is “the” graveyard dua?
All three narrations stand in one chapter of Sahih Muslim, and each is sourced; this page does not crown one of them. They are not three rival versions of a single text. One is a teaching — words he ﷺ taught for the graveyard. One is his own practice, at al-Baqi’ in the night. One is an answer, taught to ‘Aisha when she asked how she should pray for them. They are printed apart so that none of them is mistaken for another.

Sources
Every text and claim on this page comes from these pages, read on 29 November 2026. The first block is the same block printed on Duas for Parents, the Deceased & the Funeral Prayer, where it was printed from sunnah.com’s page for Sahih Muslim 975; the two ’Aisha narrations are printed from sunnah.com’s pages for Sahih Muslim 974a and 974b, as those pages give them.
- The taught greeting, with both of its openings — Sahih Muslim 975 — sunnah.com
- His own words at al-Baqi’ — Sahih Muslim 974a — sunnah.com
- The wording taught to ’Aisha — Sahih Muslim 974b — sunnah.com
- The collection this page belongs to — Duas for Parents, the Deceased & the Funeral Prayer
- Hub — Duas & Azkar
Found an error? We correct mistakes within 24 hours, with a note on the page — write to us through the website.