Nafs () is an Arabic word occurring in the Quran, literally meaning "self", and has been translated as "psyche", "ego" or "soul". The term is cognate with the Hebrew word nephesh, . In the Quran, the word nafs is used in both the individualistic (verse 2:48) and collective sense (verse 4:1), indicating that although humanity is united in possessing the positive qualities of a nafs, they are individually responsible for exercising the agencies of the "free will" that it provides them.
Much of the popular literature on nafs, however, is focused on the Sufi conceptions of the term. According to the Sufi philosophies, the nafs in its unrefined state is "the ego", which they consider to be the lowest dimension of a person's inward existence -- his animal and satanic nature. Nafs is an important concept in the Islamic tradition, especially within Sufism and the discipline of gnosis (irfan) in Shia Islam.
The triliteral root n?n f? s?n (? ? ?) occurs 298 times in the Quran, in four derived forms:
The noun nafs has important instances in the Quran such as the following: "O you who have believed, upon you is [responsibility for] yourselves..." The major theme of the word nafs as used in the Quran is to instill a sense of individual responsibility through a strong emphasis on the choices made by the individual (as in 5:105), while at the same time reminding humanity of its common origins (verse 4:1).
The Quran affords much importance to the nafs of an individual, highlighting the agency of free will and intelligence, without which neither responsibility nor accountability can exist. The Quran does not attribute to the nafs any inherent properties of good or evil, but instead conveys the idea that it is something which has to be nurtured and self-regulated, so that it can progress into becoming 'good' and 'inwardly meaningful' through its thoughts and actions. The Quranic conception of the nafs therefore has an extremely modernistic undertone, much like Nietzsche's conception of "Übermensch" or 'Superman', as suggested by Muhammad Iqbal, a prominent Muslim scholar and philosopher, who went as far as to accuse Nietzsche of borrowing the term from Islamic thought. Iqbal stated: "It is probable that Nietzsche borrowed it (Übermensch) from the literature of Islam or of the East and degraded it by his materialism."
There are three principal stages of nafs in Sufistic Wisdom, also mentioned in different verses of the Quran. The Sufis call them "stages" in the process of development, refinement and mastery of the nafs. 
In its primitive stage the nafs incites us to commit evil; this is the nafs as the lower self, the base instincts. In the eponymous Sura of the Quran, Yusuf says "Yet I claim not that my nafs was innocent: Verily the nafs incites to evil."[Quran 12:53] Islam emphasizes the importance of fighting the inciting nafs in Quran as well as in hadith. One tradition holds that Muhammad said after returning from a war, "We now return from the small struggle (Jihad Asghar) to the big struggle (Jihad Akbar)". His companions asked, "O prophet of God, what is the big struggle?" He replied, "The struggle against nafs."
This stage is generally divided into the levels al nafs al-hayawaniyya and al nafs al-iblissiyya. Al nafs al-hayawaniyya ("the animal state") describes the self, which runs after material possessesion, sensual desires and animalistic pleasures. Al nafs al-iblissiyya is even lower than the animal state, because the self seeks to replace God in the love for itself.
The Quran enjoins the faithful "to hinder the nafs from lust",[Quran 79:40] and another traditional narration warns that "the worst enemy you have is [the nafs] between your sides." Rumi warns of the nafs in its guise of religious hypocrisy, saying "the nafs has a rosary and a Koran in its right hand, and a scimitar and dagger in the sleeve."
Animal imagery is often used to describe the nafs. A popular image is a donkey or unruly horse that must be trained and broken so that eventually it will bear its rider to the goal. Rumi compares the nafs to a camel that the hero Majnun, representing the intellect ('Aql), strains to turn in the direction of the dwelling-place of his beloved.
In Sura al-Qiyama the Quran mentions "the self-accusing nafs".[Quran 75:2] This is the stage where "the conscience is awakened and the self accuses one for listening to one's ego. One repents and asks for forgiveness." Here the nafs is inspired by one's heart, sees the results of one's actions, agrees with one's brain, sees one's weaknesses, and aspires to perfection.
In Sura al-Fajr the Quran mentions "the nafs at peace".[Quran 89:27] This is the ideal stage of ego for Muslims. On this level one is firm in one's faith and leaves bad manners behind. The soul becomes tranquil, at peace. At this stage, followers of Sufism have relieved themselves of all materialism and worldly problems and are satisfied with the will of God.
In addition to the three principal stages, another four are sometimes cited:
This stage comes between the second (The self-accusing Nafs ) and the third (the Nafs at peace) principal stages. It is the stage of action. On this level "One becomes more firm in listening to one's conscience, but is not yet surrendered." Once one have seen one's weaknesses and have set one's targets, this ego inspires one to do good. The Sufis say that it is important that whenever one think of good, one must immediately act upon it. Abbas Bin Abdul Muttalib lays down three rules:
According to the Quran, charity should be given both secretly and openly. In Muhammad Asad's translation of the Quran, 14:31 reads: "[And] tell [those of] My servants who have attained to faith that they should be constant in prayer and spend [in Our way], secretly and openly, out of what We provide for them as sustenance, ere there come a Day when there will be no bargaining, and no mutual befriending."
This stage comes after the third principal stage. On this level "one is pleased with whatever comes from Allah and doesn't live in the past or future, but in the moment." "One thinks always: 'Ilahi Anta Maqsudi wa ridhaka matlubi'. One always sees oneself as weak and in need of Allah."
Therefore, the full sequence of the seven stages of the development of the nafs is as follows: