عَنْ أَبِي ذَرٍّ جُنْدُبِ بْنِ جُنَادَةَ وَأَبِي عَبْدِ الرَّحْمَنِ مُعَاذِ بْنِ جَبَلٍ رَضِيَ اللَّهُ عَنْهُمَا، عَنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: اِتَّقِ اللَّهَ حَيْثُمَا كُنْتَ، وَأَتْبِعِ السَّيِّئَةَ الحَسَنَةَ تَمْحُهَا، وَخَالِقِ النَّاسَ بِخُلُقٍ حَسَنٍ. رَوَاهُ التِّرْمِذِيُّ وَقَالَ: حَدِيثٌ حَسَنٌ، وَفِي بَعْضِ النُّسَخِ: حَسَنٌ صَحِيحٌ

18 – It is reported on the authority of Abī Dharr Jundub bin Junādah, and Abī ‘Abdir-Raḥmān Mu’ādh bin Jabal (may Allāh be pleased with them both), that the Messenger of Allāh (peace and blessings of Allāh be upon him) said:

“Have taqwā (fear) of Allāh wherever you may be, and follow up a bad deed with a good deed which will wipe it out, and behave well towards the people.” [It was reported by Tirmidhī, who said it was a ḥasan ḥadīth, and in some copies, it is stated to be a ḥasan ṣaḥīḥ ḥadīth]

• Sunan at-Tirmidhī (1987)
• Mishkāt al-Maṣābīḥ (5083);
• Riyāḍuṣ Ṣāliḥīn (61)