All forty hadith

The 40 Hadith of Imam an-Nawawi · Hadith 18

Fear Allah wherever you are

Taqwa and good character

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

Have taqwa (fear) of Allah 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 related by at-Tirmidhi, who said it was a hasan (good) hadeeth, and in some copies it is stated to be a hasan saheeh hadeeth.

On the authority of Abu Dharr Jundub ibn Junadah, and Abu Abdur-Rahman Muadh bin Jabal (may Allah be pleased with him), that the Messenger of Allah (peace and blessings of Allah be upon him) said:

The Prophet ﷺ packs an entire ethic into one short counsel with three parts: fear Allah wherever you are; follow a bad deed with a good one, and it will wipe it out; and meet people with good character.

Read them together and you have a complete map of the believing life: your relationship with Allah in private, your way of recovering when you slip, and your conduct with the people around you. Vertical, inward, and horizontal, all in one breath.

Where this hadith comes from

This counsel is narrated together by two great Companions, Abu Dharr al-Ghifari and Mu'adh ibn Jabal (ra), and is recorded by at-Tirmidhi (1987), who graded it hasan (and in some copies hasan sahih). An-Nawawi chose it for his Forty, where it has long been treated as one of the most comprehensive hadiths in the collection, three short commands that scholars say gather the whole of religion.

The wording is famous precisely because of how much it holds in so few words: a duty toward Allah, a remedy for our own failings, and a rule for living with people. Read it as a complete ethic, not three unrelated tips.

The key words

What it means, line by line

First, 'have taqwa of Allah wherever you are.' The phrase 'wherever you are' is the heart of it: taqwa is not for the mosque or the watching eye alone, but for the empty room and the unseen choice, because Allah is present in every place.

Second, 'follow a bad deed with a good one, and it will wipe it out.' The Prophet (peace be upon him) assumes we will slip, and gives the cure: answer the fall at once with a good deed, and let the good erase the bad. Third, 'meet people with good character', the inward life turned outward into how you treat everyone you meet. The Qur'an describes this same turning of wrong into good:

Taqwa, wherever you are

The first counsel is taqwa, God-consciousness, but notice the location: wherever you are. Not only in the mosque, not only when others are watching, but in the empty room, the private screen, the unseen choice. The believer carries an awareness of Allah into every place, because there is no place Allah is absent.

This is the cure for the divided life, righteous in public, careless in private. The Prophet ﷺ closes that gap. Real taqwa is consistent; it does not wait for an audience.

The good deed that wipes the bad

The second counsel is pure mercy. We will fall; the Prophet ﷺ assumes it. So he gives the recovery: when you do a bad deed, follow it with a good one, and the good will erase it. The slip is not the end of the story. It is met, answered, and undone by what you do next.

This is how a believer keeps moving without despair. No sin is meant to become a place you sit down and stay. You rise, you do good on top of it, and you keep walking. Allah Himself describes the way evil is best answered:

Good character with people

The third counsel turns outward: meet people with good character. After your relationship with Allah and your private recovery comes your public conduct, and the Prophet ﷺ sums it in a single phrase. Good character is not an optional polish; in another hadith he said nothing is heavier on the scales.

Together the three counsels hold a whole life: be conscious of Allah when no one sees, repair quickly when you fall, and be beautiful in how you treat everyone you meet. A person who lives these three has been given, in one sentence, the shape of a righteous life.

Carry this with you

Three counsels, one whole life: with Allah, with your own slips, and with people.

  • Taqwa wherever you are.

    Carry awareness of Allah into the private and the public alike. Real consciousness needs no audience.

  • Answer a slip with a good deed.

    When you fall, follow it with good, and it wipes the bad. No sin is a place to sit down and stay.

  • Meet people with good character.

    Good akhlaq is not optional polish; nothing is heavier on the scales.

  • One sentence, a whole life.

    Right with Allah privately, quick to repair, beautiful with people: the shape of a righteous life.

A du'a to carry

رَبَّنَا لَا تُزِغْ قُلُوبَنَا بَعْدَ إِذْ هَدَيْتَنَا وَهَبْ لَنَا مِن لَّدُنكَ رَحْمَةً ۚ إِنَّكَ أَنتَ ٱلْوَهَّابُ

Rabbana la tuzigh qulubana ba'da idh hadaytana wa hab lana min ladunka rahmah

Our Lord, let not our hearts deviate after You have guided us, and grant us from Yourself mercy. Indeed, You are the Bestower. (Aal 'Imran 3:8)

A du'a for a steady heart

In one short breath the Prophet ﷺ gave a man, and us, the whole arc of a believing life: be conscious of Allah when no one is looking, rise quickly when you fall, and be gentle and good with everyone you meet.

There is no corner of life these three do not reach, the private self, the fallen self, the social self, each handed back to Allah and made beautiful.

O Allah, make us conscious of You wherever we are, let our good deeds chase away our bad, and grace us with character that draws people toward You. Let not our hearts deviate after You have guided us. Ameen.

The hadith is from sunnah.com: 'Fear Allah wherever you are, follow a bad deed with a good one to wipe it out, and treat people with good character,' narrated by Abu Dharr and Mu'adh ibn Jabal (ra), at-Tirmidhi 1987, graded hasan. Qur'an citations (41:34, in part, and 3:8) are in Uthmani script verified via quran.ai (ar-uthmani-minimal) with the Saheeh International translation. Per the editorial policy this stays with taqwa, repentance, and character. FOR SCHOLAR REVIEW before publication.

Questions

What are the three parts of this hadith?
Fear Allah wherever you are (taqwa, in public and private); follow a bad deed with a good one, which wipes it out (quick repentance and recovery); and meet people with good character (beautiful conduct with others). Together they cover one's relationship with Allah, with one's own slips, and with people.
What does 'fear Allah wherever you are' add to just 'fear Allah'?
The phrase 'wherever you are' emphasises consistency, especially in private, where no human sees. It cures the divided life of public piety and private carelessness, reminding us that Allah is present in every place and that real taqwa does not depend on an audience.
Does a good deed really erase a bad one?
The Prophet ﷺ taught that good deeds wipe away bad ones, a mercy echoed in the Qur'an. This refers especially to minor sins and to sincere repentance expressed through doing good. It is an encouragement never to despair after a slip, but to answer it immediately with good.
Why is good character placed alongside taqwa?
Because Islam joins worship of Allah with excellent treatment of His creation. The Prophet ﷺ taught that good character is among the weightiest things on the scales and that the best believers are the best in character. This hadith makes conduct with people inseparable from consciousness of Allah.

What stayed with you?

A private note, kept only on this device. Find it again on your journey page.

One hadith a day, in your calendar.

Subscribe, free