Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:13646ʿAffān > Ḥammād > Thābit > Anas

[Machine] "The companions of the Prophet (PBUH) used to say while digging the trench: 'We are the ones who pledged allegiance to Muhammad on Islam, and we will never turn away.' And the Prophet (PBUH) used to say: 'O Allah, the goodness is the goodness of the hereafter, so forgive the Ansar and the Muhajirun.' And the Messenger of Allah (PBUH) brought a loaf of barley bread with crushed date on it, and they ate from it. And the Prophet (PBUH) said: 'Indeed, the goodness is the goodness of the hereafter.'"  

أحمد:١٣٦٤٦حَدَّثَنَا عَفَّانُ حَدَّثَنَا حَمَّادٌ قَالَ أَخْبَرَنَا ثَابِتٌ عَنْ أَنَسٍ

أَنَّ أَصْحَابَ النَّبِيِّ ﷺ كَانُوا يَقُولُونَ وَهُمْ يَحْفِرُونَ الْخَنْدَقَ[البحر الرجز]نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْإِسْلَامِ مَا بَقِينَا أَبَدَاوَالنَّبِيُّ ﷺ يَقُولُاللهُمَّ إِنَّ الْخَيْرَ خَيْرُ الْآخِرَهْ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَهْوَأُتِيَ رَسُولُ اللهِ ﷺ بِخُبْزِ شَعِيرٍ عَلَيْهِ إِهَالَةٌ سَنِخَةٌ فَأَكَلُوا مِنْهَا وَقَالَ النَّبِيُّ ﷺ إِنَّمَا الْخَيْرُ خَيْرُ الْآخِرَةِ  


See similar narrations below:

Collected by Bukhārī, Muslim, Aḥmad, Ḥākim, Bayhaqī
bukhari:7201ʿAmr b. ʿAlī > Khālid b. al-Ḥārith > Ḥumayd > Anas

The Prophet ﷺ went out on a cold morning while the Muhajirin (emigrants) and the Ansar were digging the trench. The Prophet ﷺ then said, "O Allah! The real goodness is the goodness of the Here after, so please forgive the Ansar and the Muhajirin." They replied, "We are those who have given the Pledge of allegiance to Muhammad for to observe Jihad as long as we remain alive."  

البخاري:٧٢٠١حَدَّثَنَا عَمْرُو بْنُ عَلِيٍّ حَدَّثَنَا خَالِدُ بْنُ الْحَارِثِ حَدَّثَنَا حُمَيْدٌ

عَنْ أَنَسٍ ؓ خَرَجَ النَّبِيُّ ﷺ فِي غَدَاةٍ بَارِدَةٍ وَالْمُهَاجِرُونَ وَالأَنْصَارُ يَحْفِرُونَ الْخَنْدَقَ فَقَالَ اللَّهُمَّ إِنَّ الْخَيْرَ خَيْرُ الآخِرَهْ فَاغْفِرْ لِلأَنْصَارِ وَالْمُهَاجِرَهْ فَأَجَابُوا نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا بَقِينَا أَبَدَا  

muslim:1805dMuḥammad b. Ḥātim > Bahz > Ḥammād b. Salamah > Thābit > Anas

We are those who have sworn allegiance to Muhammad (And made a covenant with him) to follow Islam as long as we live. Hammad is not sure whether Anas said:" Ala'l-Islam" or," Ala'l-Jihad". And the Prophet ﷺ was chanting: O God, the real good is the good of the Hereafter, So forgive Thou the Ansar and the Muhajirs.  

مسلم:١٨٠٥dحَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ حَدَّثَنَا بَهْزٌ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ حَدَّثَنَا ثَابِتٌ عَنْ أَنَسٍ

أَنَّ أَصْحَابَ مُحَمَّدٍ ﷺ كَانُوا يَقُولُونَ يَوْمَ الْخَنْدَقِ نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدًا عَلَى الإِسْلاَمِ مَا بَقِينَا أَبَدًا أَوْ قَالَ عَلَى الْجِهَادِ شَكَّ حَمَّادٌ وَالنَّبِيُّ ﷺ يَقُولُ اللَّهُمَّ إِنَّ الْخَيْرَ خَيْرُ الآخِرَهْ فَاغْفِرْ لِلأَنْصَارِ وَالْمُهَاجِرَهْ  

ahmad:12951ʿAbīdah > Ḥumayd al-Ṭawīl > Anas b. Mālik

[Machine] The Prophet ﷺ went out one morning during a pleasant or cold day, and he saw the emigrants and the ansar digging the trench. He said, "O Allah, the good is the good of the Hereafter, so forgive the ansar and the emigrants." And they responded to him. [Al-Bahr ar-Rajz] We are the ones who pledged allegiance to Muhammad for Jihad, and we will never go back on it.  

أحمد:١٢٩٥١حَدَّثَنَا عَبِيدَةُ عَنْ حُمَيْدٍ الطَّوِيلِ عَنْ أَنَسِ بْنِ مَالِكٍ قَالَ

خَرَجَ النَّبِيُّ ﷺ فِي غَدَاةٍ قَرَّةٍ أَوْبَارِدَةٍ فَإِذَا الْمُهَاجِرُونَ وَالْأَنْصَارُ يَحْفِرُونَ الْخَنْدَقَ فَقَالَ اللهُمَّ إِنَّ الْخَيْرَ خَيْرُ الْآخِرَهْ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَهْ فَأَجَابُوهُ[البحر الرجز]نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا بَقِينَا أَبَدَا  

ahmad:14068ʿAffān > Ḥammād > Thābit > Anas

[Machine] The companions of the Prophet ﷺ used to say while they were digging the trench: "We are those who pledged allegiance to Muhammad for Islam, and we will never retreat." And the Prophet ﷺ used to say: "O Allah, surely the kindest of favors is the favor of the Hereafter, so forgive the Ansar (helpers) and the Muhajirun (emigrants)." Then, the Messenger of Allah ﷺ would bring some barley bread and a dish of fat, and they would eat from it. And the Prophet ﷺ would say: "Indeed, the best goodness is the goodness of the Hereafter."  

أحمد:١٤٠٦٨حَدَّثَنَا عَفَّانُ حَدَّثَنَا حَمَّادٌ قَالَ أَخْبَرَنَا ثَابِتٌ عَنْ أَنَسٍ

أَنَّ أَصْحَابَ النَّبِيِّ ﷺ كَانُوا يَقُولُونَ وَهُمْ يَحْفِرُونَ الْخَنْدَقَ[البحر الرجز]نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْإِسْلَامِ مَا بَقِينَا أَبَدَاوَالنَّبِيُّ ﷺ يَقُولُاللهُمَّ إِنَّ الْخَيْرَ خَيْرُ الْآخِرَهْ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَهْفَأُتِيَ رَسُولُ اللهِ ﷺ بِخُبْزِ شَعِيرٍ وَإِهَالَةٍ سَنِخَةٍ فَأَكَلُوا مِنْهَا وَقَالَ النَّبِيُّ ﷺ إِنَّمَا الْخَيْرُ خَيْرُ الْآخِرَة  

ahmad:13127Ibn Abū ʿAdī > Ḥumayd > Anas

[Machine] The Messenger of Allah ﷺ and the immigrants went out to dig the trench on a cold morning. Anas narrated that they did not have servants, so the Messenger of Allah ﷺ said, "O Allah, indeed the good is only the good of the Hereafter, so forgive the Ansar and the Muhajireen." They responded, "We are the ones who pledged allegiance to Muhammad for jihad, we will never retreat."  

أحمد:١٣١٢٧حَدَّثَنَا ابْنُ أَبِي عَدِيٍّ عَنْ حُمَيْدٍ عَنْ أَنَسٍ قَالَ

خَرَجَ رَسُولُ اللهِ ﷺ وَالْمُهَاجِرُونَ يَحْفِرُونَ الْخَنْدَقَ فِي غَدَاةٍ بَارِدَةٍ قَالَ أَنَسٌ وَلَمْ يَكُنْ لَهُمْ خَدَمٌ فَقَالَ رَسُولُ اللهِ ﷺ اللهُمَّ إِنَّمَا الْخَيْرُ خَيْرُ الْآخِرَهْ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَهْ قَالَ فَأَجَابُوهُ[البحر الرجز]نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا بَقِينَا أَبَدَاأوْ لَا نَفِرُّ  

hakim:7123al-Ḥusayn b. ʿAlī al-Tamīmī > Muḥammad b. Isḥāq > Aḥmad b. Ḥafṣ from my father > Ibrāhīm b. Ṭahmān > ʿAbd al-ʿAzīz b. Ṣuhayb > Anas

[Machine] I saw the immigrants and the supporters digging the trench around the city and carrying the soil on their backs. They would say [Surah Al-Bahr Al-Rajz]: "We are those who pledged allegiance to Muhammad on Islam, and we will never forsake it. The Messenger of Allah ﷺ would respond to them, saying, 'O Allah, there is no good except the good of the Hereafter, so bless the supporters and the immigrants.' Then a plate would be brought containing a handful of barley grains that were roasted and prepared with unsalted fat. It would be placed in front of the people while they were starving. It had a horrible taste and a strong smell."  

الحاكم:٧١٢٣أَخْبَرَنِي الْحُسَيْنُ بْنُ عَلِيٍّ التَّمِيمِيُّ ثَنَا مُحَمَّدُ بْنُ إِسْحَاقَ ثَنَا أَحْمَدُ بْنُ حَفْصٍ حَدَّثَنِي أَبِي حَدَّثَنِي إِبْرَاهِيمُ بْنُ طَهْمَانَ عَنْ عَبْدِ الْعَزِيزِ بْنِ صُهَيْبٍ عَنْ أَنَسٍ قَالَ

لَقَدْ رَأَيْتُ الْمُهَاجِرِينَ وَالْأَنْصَارَ يَحْفِرُونَ الْخَنْدَقَ حَوْلَ الْمَدِينَةِ وَيَنْقُلُونَ التُّرَابَ عَلَى ظُهُورِهِمْ يَقُولَونَ [البحر الرجز] نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْإِسْلَامِ مَا بَقِينَا أَبَدَا وَرَسُولُ اللَّهِ ﷺ يُجِيبُهُمْ وَيَقُولُ «اللَّهُمَّ لَا خَيْرَ إِلَّا خَيْرَ الْآخِرَةِ فَبَارِكْ فِي الْأَنْصَارِ وَالْمُهَاجِرَهْ» فَيُجَاءُ بِالصَّحْفَةِ فِيهَا مِلْءُ كَفٍّ مِنْ شَعِيرٍ مَحْشُوشٍ قَدْ صُنِعَ بِإِهَالَةٍ سَنِخَةٍ فَتُوضَعُ بَيْنَ يَدَيِ الْقَوْمِ وَهُمْ جِيَاعٌ وَلَهَا بَشِعَةٌ فِي الْحَلْقِ وَلَهَا رِيحٌ  

«هَذَا حَدِيثٌ صَحِيحٌ عَلَى شَرْطِ الشَّيْخَيْنِ وَلَمْ يُخَرِّجَاهُ بِهَذِهِ الزِّيَادَةِ» على شرط البخاري ومسلم
bayhaqi:13292Abū Ṭāhir al-Faqīh from Aṣl Samāʿih > Abū al-Faḍl ʿAbdūs b. al-Ḥusayn b. Manṣūr al-Simsār al-Naysābūrī > Abū Ḥātim Muḥammad b. Idrīs al-Rāzī > Muḥammad b. ʿAbdullāh al-Anṣārī > Ḥumayd al-Ṭawīl > Anas b. Mālik

The Prophet ﷺ went out on a cold morning while the Muhajirin (emigrants) and the Ansar were digging the trench. The Prophet ﷺ then said, "O Allah! The real goodness is the goodness of the Here after, so please forgive the Ansar and the Muhajirin." They replied, "We are those who have given the Pledge of allegiance to Muhammad for to observe Jihad as long as we remain alive." (Using translation from Bukhārī 7201)   

البيهقي:١٣٢٩٢أَخْبَرَنَا أَبُو طَاهِرٍ الْفَقِيهُ مِنْ أَصْلِ سَمَاعِهِ أنبأ أَبُو الْفَضْلِ عَبْدُوسُ بْنُ الْحُسَيْنِ بْنِ مَنْصُورٍ السِّمْسَارُ النَّيْسَابُورِيُّ ثنا أَبُو حَاتِمٍ مُحَمَّدُ بْنُ إِدْرِيسَ الرَّازِيُّ ثنا مُحَمَّدُ بْنُ عَبْدِ اللهِ الْأَنْصَارِيُّ حَدَّثَنِي حُمَيْدٌ الطَّوِيلُ عَنْ أَنَسِ بْنِ مَالِكٍ ؓ قَالَ

خَرَجَ رَسُولُ اللهِ ﷺ فِي غَدَاةٍ بَارِدَةٍ وَالْمُهَاجِرُونَ وَالْأَنْصَارُ يَحْفِرُونَ الْخَنْدَقَ فَقَالَ اللهُمَّ إِنَّ الْخَيْرَ خَيْرُ الْآخِرَةِ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَةِ فَأَجَابُوهُ [البحر الرجز] نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا بَقِينَا أَبَدَا  

أَخْرَجَهُ الْبُخَارِيُّ مِنْ أَوْجُهٍ عَنْ حُمَيْدٍ