It is often the case that thoughts come to our minds, some of them bad. Will we be held to account for what passes through the heart? When the following āyah of Qurʾān was revealed:
The ṣaḥābah found this hard to bear. How could they be held to account for what they concealed in their hearts? The matter weighed heavily on them, and the following āyah was later revealed, abrogating the first:
This put the hearts of the ṣaḥābah at ease, may Allāh be pleased with them all.
The people of knowledge have divided intent into five categories.
Hājis – هاجس
Khāṭir – خاطر
Ḥadīth al-nafs – حديث النفس
Hamm – هم
ʿAzm – عزم
Hājis is a passing thought, something thrown into the soul, such as a passing glance at something bad. Khāṭir is the thought that crosses the mind for a moment and lingers only briefly. Ḥadīth al-nafs is the thought one weighs: should I act on it or not?
For the first three, even when the thought is a good one, no reward attaches. The reason is plain in the case of hājis; for khāṭir and ḥadīth al-nafs, the lack of reward follows from the absence of intention.
Hamm is the intention to perform an act. It sits a stage below ʿazm in firmness, and is the first step that leads to it. The ḥadīth records that whoever has a good hamm or ʿazm, Allāh writes a full good deed for him. As for a bad thought, if it is not acted upon Allāh writes a full good deed for him; if it is acted upon, Allāh writes one bad deed against him.
ʿAzm is to hold a firm desire and conviction to act. The following ḥadīth illustrates this:
Because the victim also held a firm ʿazm to kill, he too is punished.
The poem goes:
So of the five stages of thought, the first four are not held to account; only the last, ʿazm, incurs a reckoning.
The Ḥanafīs classify narrators into four (or, on some accounts, five) groups, including the al-mastūr and majhūl categories with their five-case treatment.