"السَّلامُ على أَهل الديارِ، وفي رواية: السلام عليكم يأَهْلَ الديار من المؤْمنين والمسلمين، وإنَّا إنْ شاءَ اللهُ بكم لاحِقُون، أسأَلُ الله لنا ولكم العافية".
See similar narrations below:
Collected by Muslim, Nasāʾī, Ibn Mājah, Aḥmad, Ibn Ḥibbān, Nasāʾī's Kubrá, Bayhaqī, Suyūṭī" Peace be upon the inhabitants of the city (i. e. graveyard)." In the hadith transmitted by Zuhair (the words are):" 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."
كَانَ رَسُولُ اللَّهِ ﷺ يُعَلِّمُهُمْ إِذَا خَرَجُوا إِلَى الْمَقَابِرِ فَكَانَ قَائِلُهُمْ يَقُولُ فِي رِوَايَةِ أَبِي بَكْرٍ السَّلاَمُ عَلَى أَهْلِ الدِّيَارِ وَفِي رِوَايَةِ زُهَيْرٍ السَّلاَمُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ لَلَاحِقُونَ أَسْأَلُ اللَّهَ لَنَا وَلَكُمْ الْعَافِيَةَ
when the Messenger of Allah came to the graveyard he would say: "As-salamu 'alaykum ahli ad-diyari min al-mu'minin wal-muslimin wa inna I sha' Allahu bikum lana faratun wa nahnu lakum taba'un, as'alullahal-'afiyata lana wa lakum. (Peace by upon the inhabitants of this place among the believers and Muslims. Soon we will join you, if Allah willing. You have gone on ahead of us and we will follow you. I ask Allah to keep us and you safe and sound.)"
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا أَتَى عَلَى الْمَقَابِرِ فَقَالَ السَّلاَمُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لاَحِقُونَ أَنْتُمْ لَنَا فَرَطٌ وَنَحْنُ لَكُمْ تَبَعٌ أَسْأَلُ اللَّهَ الْعَافِيَةَ لَنَا وَلَكُمْ
“The Messenger of Allah ﷺ used to teach them, when they went out to the graveyard, to say: As-salamu ‘alaykum ahlad-diyar minal-mu’minina wal- muslimin, wa inna insha’ Allah bikum lahiqun, nas’alul-laha lana wa lakumul-‘afiyah (Peace be upon you, O inhabitants of the abodes, believers and Muslims, and we will join you soon if Allah wills. We ask Allah for well-being for us and for you).’”
كَانَ رَسُولُ اللَّهِ ﷺ يُعَلِّمُهُمْ إِذَا خَرَجُوا إِلَى الْمَقَابِرِ كَانَ قَائِلُهُمْ يَقُولُ السَّلاَمُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لاَحِقُونَ نَسْأَلُ اللَّهَ لَنَا وَلَكُمُ الْعَافِيَةَ
“The Messenger of Allah ﷺ used to teach them, when they went out to the graveyard, to say: As-salamu ‘alaykum ahlad-diyar minal-mu’minina wal- muslimin, wa inna insha’ Allah bikum lahiqun, nas’alul-laha lana wa lakumul-‘afiyah (Peace be upon you, O inhabitants of the abodes, believers and Muslims, and we will join you soon if Allah wills. We ask Allah for well-being for us and for you).’” (Using translation from Ibn Mājah 1547)
كَانَ رَسُولُ اللهِ ﷺ يُعَلِّمُهُمْ إِذَا خَرَجُوا إِلَى الْمَقَابِرِ فَكَانَ قَائِلُهُمْ يَقُولُ السَّلَامُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ إِنَّا إِنْ شَاءَ اللهُ بِكُمْ لَاحِقُونَ قَالَ مُعَاوِيَةُ فِي حَدِيثِهِ أَنْتُمْ فَرَطُنَا وَنَحْنُ لَكُمْ تَبَعٌ وَنَسْأَلُ اللهَ لَنَا وَلَكُمُ الْعَافِيَةَ
“The Messenger of Allah ﷺ used to teach them, when they went out to the graveyard, to say: As-salamu ‘alaykum ahlad-diyar minal-mu’minina wal- muslimin, wa inna insha’ Allah bikum lahiqun, nas’alul-laha lana wa lakumul-‘afiyah (Peace be upon you, O inhabitants of the abodes, believers and Muslims, and we will join you soon if Allah wills. We ask Allah for well-being for us and for you).’” (Using translation from Ibn Mājah 1547)
كَانَ رَسُولُ اللهِ ﷺ يُعَلِّمُهُمْ إِذَا خَرَجُوا إِلَى الْمَقَابِرِ يَقُولُ السَّلَامُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللهُ بِكُمْ لَلَاحِقُونَ أَنْتُمْ لَنَا فَرَطٌ وَنَحْنُ لَكُمْ تَبَعٌ فَنَسْأَلُ اللهَ لَنَا وَلَكُمُ الْعَافِيَةَ
ذِكْرُ الْأَمْرِ لِمَنْ دَخَلَ الْمَقَابِرَ أَنْ يَسْأَلَ اللَّهَ جَلَّ وَعَلَا الْعَافِيَةَ لِنَفْسِهِ، وَلِمَنْ تَحْتَ أَطْبَاقِ الثَّرَى، نَسْأَلُ اللَّهَ الْبَرَكَةَ فِي تِلْكَ الْحَالَةِ
“The Messenger of Allah ﷺ used to teach them, when they went out to the graveyard, to say: As-salamu ‘alaykum ahlad-diyar minal-mu’minina wal- muslimin, wa inna insha’ Allah bikum lahiqun, nas’alul-laha lana wa lakumul-‘afiyah (Peace be upon you, O inhabitants of the abodes, believers and Muslims, and we will join you soon if Allah wills. We ask Allah for well-being for us and for you).’” (Using translation from Ibn Mājah 1547)
كَانَ رَسُولُ اللَّهِ ﷺ إِذَا خَرَجُوا إِلَى الْمَقَابِرِ يُعَلِّمُهُمْ أَنْ يَقُولُوا «السَّلَامُ عَلَى أَهْلِ الدَّارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لَلَاحِقُونَ أَنْتُمْ لَنَا فَرَطٌ وَنَحْنُ لَكُمْ تَبَعٌ نَسْأَلُ اللَّهَ لَنَا وَلَكُمُ الْعَافِيَةَ»
when the Messenger of Allah came to the graveyard he would say: "As-salamu 'alaykum ahli ad-diyari min al-mu'minin wal-muslimin wa inna I sha' Allahu bikum lana faratun wa nahnu lakum taba'un, as'alullahal-'afiyata lana wa lakum. (Peace by upon the inhabitants of this place among the believers and Muslims. Soon we will join you, if Allah willing. You have gone on ahead of us and we will follow you. I ask Allah to keep us and you safe and sound.)" (Using translation from Nasāʾī 2040)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ إِذَا أَتَى عَلَى الْمَقَابِرِ قَالَ «السَّلَامُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللهُ بِكُمْ لَلَاحِقُونَ أَنْتُمْ لَنَا فَرَطٌ وَنَحْنُ لَكُمْ تَبَعٌ أَسْأَلُ اللهَ الْعَافِيَةَ لَنَا وَلَكُمْ»
when the Messenger of Allah came to the graveyard he would say: "As-salamu 'alaykum ahli ad-diyari min al-mu'minin wal-muslimin wa inna I sha' Allahu bikum lana faratun wa nahnu lakum taba'un, as'alullahal-'afiyata lana wa lakum. (Peace by upon the inhabitants of this place among the believers and Muslims. Soon we will join you, if Allah willing. You have gone on ahead of us and we will follow you. I ask Allah to keep us and you safe and sound.)" (Using translation from Nasāʾī 2040)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ إِذَا أَتَى عَلَى الْمَقَابِرِ قَالَ «السَّلَامُ عَلَيْكُمْ أَهْلَ الدَّارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللهُ بِكُمْ لَاحِقُونَ أَنْتُمْ لَنَا فَرَطٌ وَنَحْنُ لَكُمْ تَبَعٌ وَأَسْأَلُ اللهَ الْعَافِيَةَ لَنَا وَلَكُمْ»
“The Messenger of Allah ﷺ used to teach them, when they went out to the graveyard, to say: As-salamu ‘alaykum ahlad-diyar minal-mu’minina wal- muslimin, wa inna insha’ Allah bikum lahiqun, nas’alul-laha lana wa lakumul-‘afiyah (Peace be upon you, O inhabitants of the abodes, believers and Muslims, and we will join you soon if Allah wills. We ask Allah for well-being for us and for you).’” (Using translation from Ibn Mājah 1547)
كَانَ رَسُولُ اللهِ ﷺ يُعَلِّمُهُمْ إِذَا خَرَجُوا إِلَى الْمَقَابِرِ السَّلَامُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَإِنَّا إِنْ شَاءَ اللهُ بِكُمْ لَاحِقُونَ أَنْتُمْ لَنَا فَرَطٌ وَنَحْنُ لَكُمْ تَبَعٌ نَسْأَلُ اللهَ الْعَافِيَةَ وَكَذَلِكَ
"قُولِى: السَّلامُ عَلَى أَهْلِ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ وَيَرْحَمُ الله المُسْتَقْدِمِينَ مِنَّا، وَالْمُسْتَأخِرِينَ، وَإِنَّا إِنْ شَاءَ الله بِكُمْ لاحِقُونَ".