In Islam
Ali's place is said to be second only to Muhammad in Shia Islam. Ali is revered for his courage, honesty, unbending devotion to Islam, magnanimity, and equal treatment of all Muslims. For his admirers, he has thus become the archetype of uncorrupted Islam and pre-Islamic chivalry.
Ali regularly represented Muhammad in missions which are commonly linked to Quranic injunctions. For instance, the verse of walaya (5:55) is a reference to when Ali gave his ring to a beggar, while praying in the mosque, according to Shia and some Sunni accounts. If so, then this verse gives Ali the same spiritual authority (walaya) as Muhammad. In Shia sources, the verse of tabligh (5:67) spurred Muhammad to designate Ali as his successor at the Ghadir Khumm, while the verse of ikmal al-din (5:3) subsequently announced the perfection of Islam. The verse of purification (33:33) concerns the status of purity of the Ahl al-Bayt (lit. 'people of the house'), which is limited to Ali, Fatima, and their two sons in Shia and some Sunni sources. Another reference to the Ahl al-Bayt might be the verse of mawadda (42:23). For Shias, this verse is a Quranic mandate to love and follow the Ahl al-Bayt.
Muhammad frequently praised the qualities of Ali. The most controversial such statement, "He whose mawla I am, Ali is his mawla," was delivered at the Ghadir Khumm. This gave Ali the same spiritual authority (walaya) as Muhammad, according to Shias. Elsewhere, the hadith of the position likens Muhammad and Ali to Moses and Aaron, and thus supports the usurped right of Ali to succeed Muhammad in Shia Islam. Other examples in standard Shia and Sunni collections of hadith include, "There is no youth braver than Ali," "No-one but a believer loves Ali, and no-one but a hypocrite (munafiq) hates Ali," "I am from Ali, and Ali is from me, and he is the wali (lit. 'patron' or 'guardian') of every believer after me," "The truth revolves around him [Ali] wherever he goes," "I am the city of knowledge and Ali is its gate (bab)," "Ali is with the Quran and the Quran is with Ali. They will not separate until they return to me at the [paradisal] pool."
Ali is the common source of mystical and spiritual currents within both Sunni and Shia sects of Islam. In particular, Ali is the spiritual head of some Sufi movements, for Sufis believe that Ali inherited from Muhammad his esoteric knowledge and saintly authority, which guide believers on their journey toward God. Nearly all Sufi orders trace their lineage to Muhammad through Ali, an exception being the Naqshbandis, who reach Muhammad through Abu Bakr.
In Sunni Islam, Ali is venerated as a close companion of Muhammad, a foremost authority on the Quran and Islamic law, and the fountainhead of wisdom in Sunni spirituality. When Muhammad died in 632, Ali had his claims to leadership, perhaps in reference to the Ghadir Khumm, but he eventually accepted the temporal rule of the first three caliphs in the interest of Muslim unity. Ali is portrayed in Sunni sources as a trusted advisor of the first three caliphs, while their conflicts with Ali are minimized, in line with the Sunni tendency to show accord among companions. As the fourth caliph, Ali holds a particularly high status in Sunni Islam, although this doctrinal reverence for Ali is a recent development for which the prominent Sunni traditionist Ibn Hanbal (d. 855) is likely to be credited. Sunni hierarchy of companions places Ali below his three predecessors and above those who fought against him. This ordering has required Sunni reinterpretation of those prophetic sayings that explicitly elevate Ali above all companions.
Ali takes center stage in Shia Islam: The Arabic word shi'a itself is short for 'shi'a of Ali' (lit. 'followers of Ali'), his name is incorporated into the daily call to prayer (adhan), and he is regarded as the foremost companion of Muhammad. The defining doctrine of Shia Islam is that Ali was the rightful successor of Muhammad through divinely-ordained designation, which is primarily a reference to the Ghadir Khumm. Ali is thought to have inherited the political and religious authority of Muhammad, even before his ascension to the caliphate in 656. In particular, Ali's predecessors are regarded as illegitimate rulers and usurpers of his rights. The all-encompassing bond of loyalty between Shias and their imams (and Muhammad in his capacity as imam) is known as walaya. Ali is also thought to be endowed with the privilege of intercession on the Judgment Day. Early on, some Shias even attributed divinity to Ali, but such extreme views were gradually rooted out of Shi'ism.
In Shia belief, Ali also inherited the esoteric knowledge of Muhammad, for instance, in view of the prophetic hadith, "I [Muhammad] am the city of knowledge, and Ali is its gate." Ali is thus regarded, after Muhammad, as the interpreter, par excellence, of the Quran and the sole authoritative source of its (esoteric) teachings. Unlike Muhammad, however, Ali is not thought to have received divine revelation (wahy), though he might have been guided by divine inspiration (ilham). Verse 21:73 of the Quran is sometimes cited here, "We made them imams, guiding by Our command, and We revealed (awhayna') to them the performance of good deeds, the maintenance of prayers, and the giving of zakat (alms), and they used to worship Us." Shias also believe in the infallibility of Ali, as with Muhammad, that is, their divine protection from sins. Here, the verse of purification is sometimes cited. Ali's words and deeds are therefore considered a model for the Shia community and a source for their religious injunctions.
Ibadis maintain a distinct theological judgment of Ali based on his adherence to Quranic principles during the First Fitna. While they initially recognized his legitimacy and approved of his stance against the rebellions of Aisha and Mu'awiya, the Ibadi tradition holds that Ali forfeited his right to lead when he accepted human arbitration at the Battle of Siffin. From the Ibadi perspective, this decision constituted an abandonment of divine mandate, rendering him unfit for the imamate.
This judgment is solidified by Ali's subsequent military action at the Battle of Nahrawan, where his forces defeated the Ahl al-Nahr (People of the River). Ibadis regard these fallen opponents as the true keepers of the faith and consider their leader, Abd Allah ibn Wahb al-Rasibi, to be the legitimate successor to the imamate following what they identify as the error of Ali at Siffin. Consequently, in Ibadi historiography, Ali is not viewed as a rightly-guided figure in his later years. Instead, the genealogy of Islam (nasab al-islām) is believed to have been preserved by those who dissociated from his compromised leadership.
Modern Ibadi scholars interpret these events as a trial of faith. By refusing to comply with divine law through his participation in arbitration, Ali—despite his previous dignity and Islamic merits—is perceived to have set a pattern of behavior that demonstrated his failure to uphold the standards required of a just imam. Because ordinary Muslims are deemed to be "ungrateful for God's blessings" (kuffar ni'ma) if they persist in supporting such errors, Ibadis maintain a stance of spiritual dissociation (bara'a) from the political legacy of the later caliphs, including Ali and Uthman, while simultaneously avoiding the indiscriminate violence advocated by more extremist Kharijite sects.
The Alawites venerate Ali, the first of the Twelve Imams, as the physical manifestation of God. Their testimony of faith (shahada) translates as "there is no God but Ali". The Alawite trinity envisions God as being composed of three distinct manifestations, Ma'na (meaning), Ism (Name) and Bab (Door); which together constitute an "indivisible trinity". Ma'na symbolises the "source and meaning of all things" in Alawite mythology. According to Alawite doctrines, Ma'na generated the Ism, which in turn built the Bab. These beliefs are closely tied to the Alawite doctrine of reincarnations of the trinity. The final trinity of reincarnation in the Alawite trinity consists of Ali (Ma'na), Muhammad (Ism) and Salman the Persian (Bab). Alewites depict them as the sky, sun and moon respectively. Alawites deify Ali as the "last and supreme manifestation of God" who built the universe, attribute to him divine superiority, and believe that Ali created Muhammad and gave him the mission to spread Qur'anic teachings on earth.