HADITH

Actions Are by Intentions: Understanding the First Hadith in Bukhari

What the hadith “actions are by intentions” says, who narrated it, where it appears in Bukhari and Muslim, and how intention shapes worship and daily life.

By 11 min read

Close-up of gold Kufic script on the page of an early Quran manuscript
"Close-up of Kufic Quranic Manuscript" by Bebo12321, CC BY-SA 4.0, via Wikimedia Commons

"Actions are by intentions" is a saying of the Prophet Muhammad ﷺ, narrated by Umar ibn al-Khattab, that teaches that every deed is judged by the intention behind it, and that each person receives only what they intended. Imam al-Bukhari placed it as the very first hadith of his Sahih (Sahih al-Bukhari 1), and Imam an-Nawawi opened his famous forty hadith with it too (An-Nawawi's 40 Hadith 1).

It is short enough to memorize in a minute, yet scholars have built whole chapters of law and spirituality on it. This guide covers the wording, the chain of narrators, where the hadith appears, what it means, and how it plays out in prayer, fasting, work and family life.

Key Takeaways

  • The hadith says deeds count by their intentions and each person gets what they intended. It is narrated by Umar ibn al-Khattab and recorded in both Sahih al-Bukhari and Sahih Muslim.
  • Al-Bukhari opens his collection with it, and an-Nawawi makes it hadith 1 of his forty, so many students meet it first.
  • Intention (niyyah) does two jobs: it separates worship from habit, and it decides who an act is really for.
  • A good intention cannot make a forbidden act acceptable, but it can turn ordinary acts, like feeding your family, into rewarded ones.
  • Intention lives in the heart. Scholars differ on whether saying it aloud is recommended, so follow a qualified teacher on that detail.

What Does the Hadith Say?

The core wording is two sentences followed by an example. In Arabic it opens with إِنَّمَا الأَعْمَالُ بِالنِّيَّاتِ (innamal a'malu bin-niyyat), "actions are only by intentions". In Muhsin Khan's English translation of Sahih al-Bukhari, the Prophet ﷺ said that "the reward of deeds depends upon the intentions and every person will get the reward according to what he has intended" (Sahih al-Bukhari 1).

The example that follows is about hijrah, the migration of the early Muslims to Madinah. In the fuller wording, whoever migrated for Allah and His Messenger, their migration was for Allah and His Messenger; and whoever migrated for some worldly gain or to marry a woman, their migration was for whatever they migrated for (Sahih al-Bukhari 54; Sahih Muslim 1907a).

The example matters. Two people could make the same journey, carry the same luggage and arrive in the same city. From the outside their actions are identical. The hadith says they are not equal, because one travelled for Allah and the other for something else.

Why the Wording in Bukhari 1 Is Shorter

If you read Sahih al-Bukhari 1 closely in common translations, it mentions only the second half of the example: the person who migrated for worldly reasons. The complete version, with both halves, appears elsewhere in the same book, such as Sahih al-Bukhari 54 and Sahih al-Bukhari 6689. Readers sometimes think a phrase is missing. It is the same hadith, quoted from a different route in the opening chapter.

Who Narrated It, and Why Is It Considered Authentic?

Umar ibn al-Khattab, the second caliph, narrated this hadith from the Prophet ﷺ. In Sunan Ibn Majah his student Alqamah ibn Waqqas reports hearing Umar say it while addressing the people (Sunan Ibn Majah 4227), and in one of al-Bukhari's versions Umar begins with "O people!" (Sahih al-Bukhari 6953).

The hadith is graded sahih (authentic). It appears in both Sahih al-Bukhari and Sahih Muslim, two of the six major hadith collections, which hadith scholars call muttafaq alayh (agreed upon), the strongest category of authenticity. Al-Albani graded the narration in Sunan Abi Dawud sahih (Sunan Abi Dawud 2201), and at-Tirmidhi called it hasan sahih in his own collection (Jami at-Tirmidhi 1647).

There is one technical point worth knowing. Ibn Rajab al-Hanbali explains in his commentary that the authentic routes of this hadith all pass through a single line for the first few generations (Ibn Rajab, Jami al-Ulum wal-Hikam, hadith 1):

  1. Umar ibn al-Khattab, who heard it from the Prophet ﷺ
  2. Alqamah ibn Waqqas al-Laythi
  3. Muhammad ibn Ibrahim at-Taymi
  4. Yahya ibn Sa'id al-Ansari, from whom many people narrated it

Ibn Rajab concludes that the hadith is not mutawatir (mass-transmitted) in its wording, though its meaning is supported by many other texts. If these terms are new, read what a hadith is and how sahih, hasan and daif gradings work, and the Islamic Trivia sources page explains which hadith collections and translations the site relies on.

Where the hadith appears

Collection Reference Grading
Sahih al-Bukhari 1, 54, 2529, 3898, 5070, 6689, 6953 Sahih (whole collection)
Sahih Muslim 1907a Sahih (whole collection)
Sunan Abi Dawud 2201 Sahih (al-Albani)
Jami at-Tirmidhi 1647 Sahih (al-Albani); at-Tirmidhi: hasan sahih
Sunan an-Nasa'i 75 Sahih (al-Albani)
Sunan Ibn Majah 4227 Sahih (al-Albani)

Al-Bukhari records it seven times, each in a different book of his collection: revelation, belief, freeing slaves, the merits of the Ansar, marriage, oaths and vows, and legal tricks. That alone shows how widely he thought it applied.

Why Did Bukhari Begin His Sahih With It?

Al-Bukhari placed this hadith at the head of his first chapter, on how revelation began (Sahih al-Bukhari 1). Scholars have long read this as a reminder to the reader, and to the author himself: check why you are studying before you study.

He was not the only one to think this way. Ibn Rajab records that the early hadith master Abd al-Rahman ibn Mahdi said anyone writing a book should begin it with this hadith, so the reader is reminded to correct their intention (Ibn Rajab, Jami al-Ulum wal-Hikam). An-Nawawi followed the same custom, which is why the hadith opens his forty hadith collection and why many people meet it in their first Islamic studies class. If you are starting that collection, the hadith quizzes are a gentle way to test what you remember.

How Important Is This Hadith to Scholars?

Classical scholars treated it as one of the central texts of Islam. Ibn Rajab reports that Imam al-Shafi'i and Imam Ahmad described it as covering a third of knowledge, and that al-Shafi'i said it enters into about seventy topics of fiqh. He also reports Imam Ahmad's statement that the foundations of Islam rest on three hadith, with "actions are by intentions" as the first (Ibn Rajab, Jami al-Ulum wal-Hikam).

Ibn Rajab also quotes al-Bayhaqi's explanation of the "third of knowledge" phrase: a person earns reward with the heart, the tongue and the body, and intention is the share of the heart (Ibn Rajab, Jami al-Ulum wal-Hikam). Whatever the exact framing, the point is the same: no deed is complete without it.

What Does Intention (Niyyah) Actually Do?

Two practical effects follow from the wording of the hadith and its migration example.

  1. It tells worship apart from habit. Washing your face can be a routine morning act or part of wudu before prayer. Skipping lunch can be a busy day or a voluntary fast. The outward act is the same; the intention decides which one it is.
  2. It decides who the act is for. Two people pray side by side. One prays for Allah; the other prays so that others will think well of him. The hadith says each gets what he intended.

The Quran makes the second point directly. Allah says the people of earlier scriptures "were not commanded except to worship Allah, being sincere to Him in religion" (Surah Al-Bayyinah 98:5). And the Prophet ﷺ is told to say that his prayer, his sacrifice, his living and his dying are all for Allah, Lord of the worlds (Surah Al-An'am 6:162).

Allah Looks at Hearts

Another authentic hadith completes the picture. The Prophet ﷺ said that Allah does not look at your faces or your wealth, but He looks at your hearts and your deeds (Sahih Muslim 2564c). Notice that deeds are still mentioned. Intention does not replace action; it gives action its value.

Can a Good Intention Make a Wrong Action Right?

No. This is a common misunderstanding. The hadith is about how deeds are rewarded: each person "will get the reward according to what he has intended" (Sahih al-Bukhari 1). It does not change what is permitted or forbidden. Another authentic hadith says that Allah is good and accepts only what is good (Sahih Muslim 1015), so stealing to give to charity is still stealing.

The reverse also holds. A good deed done for show loses its value, even though the outward act looked correct. The last verse of Surah Al-Kahf brings both sides together: whoever hopes to meet his Lord should "do righteous work" and "not associate in the worship of his Lord anyone" (Surah Al-Kahf 18:110). Righteous work is the outward side; worshipping Allah alone is the inward side.

How Intention Turns Ordinary Life Into Worship

This is where the hadith becomes practical. Many everyday acts carry reward when they are done for the sake of Allah.

  • Spending on your family. The Prophet ﷺ said that when a man spends on his family seeking reward from Allah, it counts as charity for him (Sahih al-Bukhari 55).
  • Small kindnesses at home. He told Sa'd ibn Abi Waqqas that he would be rewarded for whatever he spent for Allah's sake, even a morsel of food he put in his wife's mouth (Sahih al-Bukhari 56).
  • Work and study. Earning a halal living, learning a skill or studying for an exam can be done with the intention of supporting your family, serving people or avoiding asking others for help.

Rewarded Even When You Could Not Act

Intention can also earn reward when circumstances block the deed. In a hadith the Prophet ﷺ related from his Lord, whoever intends a good deed but does not do it has one full good deed written for them; if they do it, it is written as ten to seven hundred times or more (Sahih al-Bukhari 6491; Sahih Muslim 131a). In another, he said that whoever sincerely asks Allah for martyrdom will be raised to the rank of the martyrs even if they die in their bed (Sahih Muslim 1909).

Intention in Prayer, Fasting and Other Worship

Al-Bukhari placed the hadith in his books on belief, freeing slaves, marriage and oaths, and books of fiqh likewise discuss intention for prayer, fasting, zakat and Hajj. The detailed rules belong to the schools of law, so treat the points below as an outline, not a ruling:

  • Intention is a decision, not a formula. The hadith speaks of what a person "intended", which is an act of the heart. You know which prayer you are about to pray before you begin.
  • Saying it aloud is a difference of opinion. Scholars of the schools of law differ on whether quietly saying the intention is recommended or should be avoided. Follow the guidance of a qualified local scholar.
  • Fasting and intention. Hafsah reported that the Prophet ﷺ said whoever does not resolve to fast before dawn has no fast (Sunan Abi Dawud 2454). Al-Albani graded it sahih, while some other graders consider it weak, and the schools differ on how it applies to voluntary fasts and to Ramadan as a whole.

If you want to test what you know about fasting and its rules, the Ramadan quiz is a good next step.

Practical Ways to Live by This Hadith

These are habits many teachers suggest. They are not rulings, just ways to keep the meaning alive:

  1. Pause before you start. Before prayer, study or work, take a second to ask: who is this for?
  2. Add good intentions to routine acts. Cooking a meal can be for keeping your family healthy and strong for worship. Going to work can be for providing halal income.
  3. Renew intention when it slips. It is normal to notice mixed motives halfway through a task. Correct the intention and carry on rather than abandoning the good deed.
  4. Keep some deeds private. A private habit, such as a voluntary prayer or charity no one knows about, helps protect sincerity.
  5. Make dua for sincerity. Ask Allah to make your deeds sincerely for Him and to accept them.

Frequently Asked Questions

Is "actions are by intentions" really the first hadith in Sahih al-Bukhari?

Yes. It is hadith number 1, in the opening chapter on how revelation began (Sahih al-Bukhari 1). Al-Bukhari repeats it six more times in later chapters.

Who narrated the hadith on intentions?

Umar ibn al-Khattab narrated it from the Prophet Muhammad ﷺ. His student Alqamah ibn Waqqas heard it from him, and the hadith then passed through Muhammad ibn Ibrahim at-Taymi and Yahya ibn Sa'id al-Ansari before spreading widely.

Is the hadith on intentions sahih?

Yes. It is recorded in both Sahih al-Bukhari and Sahih Muslim, making it muttafaq alayh (agreed upon). Sunan Abi Dawud, Sunan an-Nasa'i and Sunan Ibn Majah also carry it, and hadith graders rate those narrations sahih.

What is the Arabic of "actions are by intentions"?

The opening phrase is إِنَّمَا الأَعْمَالُ بِالنِّيَّاتِ (innamal a'malu bin-niyyat). A'mal means deeds or actions, and niyyat is the plural of niyyah, intention.

Do I have to say my intention out loud before praying?

The intention itself is in the heart. Whether saying it softly is recommended is a point of difference between the schools of law, so ask a qualified local scholar which practice to follow.

The First Lesson: Check Your Intention

The hadith of intentions is the first lesson many Muslims learn, and its placement at the head of Sahih al-Bukhari is a reminder to check our motives before anything else. It teaches that the same action can be worship or habit, sincere or for show, depending on what is in the heart. It also opens a door: with the right intention, feeding your family, going to work and studying can all carry reward.

If you want to keep learning, try the daily Islamic quiz for a few questions a day, each with a linked source.

Sources

Learn your deen, one question at a time.

Keep learning in the app

Explore solo levels, a daily question, 1v1 battles and quiz rooms with friends. Download Islamic Trivia on iOS or Android.

Stores list current purchase options. Multiplayer requires internet access and available players.

Sheikh Fūl, the Islamic Trivia learning companion