Sunni view of Ali

Ali ibn Abi Talib was the cousin and son-in-law of the Islamic prophet Muhammad. Ali contributed significantly to Islam in its early years and was likely the first male to accept the teachings of Muhammad. In Sunni Islam, Ali is recognized as a close companion, a foremost authority on the Quran and Islamic law, and the fountainhead of wisdom in Sunni spirituality. When Muhammad died in 632 CE, Ali had his own claims to leadership, perhaps in reference to Muhammad's announcement at the Ghadir Khumm, but he eventually accepted the temporal rule of the first three caliphs in the interest of Muslim unity. During this period, Ali is portrayed in Sunni sources as a trusted advisor of the first three caliphs, while their conflicts with Ali are neutralized or downplayed. Ali himself succeeded to the caliphate in 656 but his rule was immediately challenged by multiple pretenders and he was assassinated in 661.

As the fourth and final Rashidun caliph, Ali is held in a particularly high status in Sunni Islam, although this doctrinal reverence for Ali in Sunni Islam is a recent development for which the prominent traditionist Ahmad ibn Hanbal is likely to be credited. His hierarchy of companions places Ali below his predecessors but above those companions who fought against him, thus accommodating into Sunni doctrine the opposite sides of a moral conflict that has split the Muslim community ever since. Those prophetic sayings that elevate Ali above other companions have also been reinterpreted by Sunni scholars to uphold the Sunni hierarchy. By contrast, Shia Islam views Ali as the rightful religious and temporal successor of Muhammad and views the predecessors of Ali as usurpers of his rights.

Background
As the cousin and son-in-law of the Islamic prophet Muhammad, Ali ibn Abi Talib was likely the first male to profess Islam. He significantly contributed to Muhammad's cause inside and outside the battlefield. After his death in 632 CE, Muhammad was succeeded by Abu Bakr ((r. 632 – 634)), Umar ((r. 634 – 644)), and Uthman ((r. 644 – 656)) in the capacity of caliphs. Uthman was widely accused, among other things, of nepotism towards his clan, the Umayyads. He was subsequently assassinated in 656, after which Ali was elected caliph in Medina. His rule was immediately challenged by Talha ibn Ubayd Allah and Zubayr ibn al-Awwam, who aspired to the caliphate, and by Muhammad's widow Aisha bint Abu Bakr. Their rebellion was suppressed in the Battle of the Camel in 656. Still, the 657 Battle of Siffin with another pretender, Mu'awiya ibn Abu Sufyan, ended in stalemate and the formation of the Kharijites (lit. 'the seceders'), who seceded from Ali's army. A member of the Kharijites is thought to be responsible for the assassination of Ali in 661, which paved the way for Mu'awiya, who took over the caliphate in 661 and found the dynastic Umayyad caliphate.

Status of Ali in Sunni Islam
Ali is recognized in Sunni Islam as a close companion, and Sunni sources contain numerous prophetic sayings (hadiths) in his praise. Ali had an excellent knowledge of the Quran, the central religious text of Islam, to the point that Ibn Abbas, a foremost early Muslim exegete, credited all his interpretations to him. Ali is also the transmitter of hundreds of prophetic hadiths in canonical Sunni sources. Sunni Islam celebrates Ali for his dedication to the cause of Islam, for his piety, wisdom, eloquence, courage on battlefield, and magnanimity in victory. Ali is moreover the common source of mystical and spiritual currents within both Sunni and Shia sects of Islam. Pilgrimage to the shrine of Ali and praying for his intercession in the afterlife remains popular among Sunnis. However, reverence for Ali in Sunni Islam has declined in recent times with the rise of Wahhabism, a fundamentalist movement within Sunni Islam.

Political views
When Muhammad died in 632, Ali had his own claims to leadership, apparently in reference to Muhammad's announcement shortly before his death at the Ghadir Khumm. Ali thus opposed the caliphate of Abu Bakr, who was hastily elected in the absence of Ali and the rest of Muhammad's kin. Perhaps in the interest of the Muslim unity, Ali eventually accepted the temporal rule of the first three caliphs, but without giving up his claims as the designated successor of Muhammad. In particular, even though Ali may have advised Abu Bakr and Umar on government and religious matters, the conflicts between him and the first two caliphs are also well-documented, but largely downplayed in Sunni sources, in line with their tendency to neutralize the conflicts among companions. These conflicts were epitomized during the proceedings of the electoral council in 644, when Ali refused to be bound by the precedence of the first two caliphs. Ali was also critical of Uthman, and in this he was joined by most of the senior companions. In early Sunni sources, Ali is portrayed as a restraining influence on Uthman without directly opposing him. By contrast, Shia Islam views Ali as the rightful successor of Muhammad and views Ali's predecessors as usurpers of his rights.

Ali and his three predecessors are acknowledged in Sunni tradition as the Rashidun caliphs, that is, those Muslim rulers who are thought to have fulfilled the moral, religious, and judicial qualifications for a just rule. Legal decisions of Ali are thus considered binding in Sunni Islam, and sayings attributed to Ali are often cited by Sunni scholars to counter Shia positions. This acceptance of Ali, however, appears to be a late development in Sunni Islam, probably dating to the ninth century. Indeed, as far as the Umayyads were concerned, their rule began with Uthman, and Ali was a mere pretender. Similarly, many proto-Sunnis considered Uthman as the last of the Rashidun caliphs. By contrast, the Murji'a (lit. 'deferrers') deferred judgment about the early caliphs in the interest of Muslim unity. Their position was incorporated into Sunni thought by the prominent traditionist Ahmad ibn Hanbal, who created a hierarchy of companions in which Abu Bakr, Umar, and Uthman are placed immediately above Ali, each of the four being the most meritorious person of their time. Through this hierarchy, Ali was eventually accommodated in Sunni Islam, alongside those companions who fought against him, about whom Sunnis are expected to defer judgment, lest they stoke further unrest and division in the Muslim community. The Sunni hierarchy of companions is challenged by those prophetic sayings that elevate Ali above others, including, "I am from Ali and Ali is from me," and "Whoever counts me as his patron (), then Ali is his patron." These hadiths have been reinterpreted accordingly. For instance, some Sunni scholars have linked the word  to the financial dependence of Ali on Muhammad, who raised the former in his household as a child. Yet other Sunni authors acknowledge the religious prominence of Ali but do not consider that a basis for political succession.

Sunni praise for Ali
Umar is said to have praised Ali as the "best of judges." The Mu'tazilite scholar Ibn Abi al-Hadid writes in his commentary on Nahj al-balagha that Ali corrected a ruling by Umar for a woman accused of adultery, after which the second caliph said, "Were it not for Ali, Umar would indeed have been destroyed." Similar sentiments are attributed to Umar in the Sunni Kitab al-Isti'ab and al-Bidaya wa'l-nihaya and the Shia Bihar al-anwar. Muhammad al-Shafi'i, founder of one of the four schools of Sunni jurisprudence, commended Ali as "the best imam, the best guide," and composed a poem in his praise. In reference to the statement attributed to Ali, "Ask me about anything till I am among you," Ahmad ibn Hanbal, founder of another Sunni school, writes that Ali was the only companion who made this claim, thus suggesting that Ali was the only companion who was qualified to make such a claim. Ibn Hanbal also commented about the caliphate of Ali, "Do you think the caliphate adorned Ali? No, rather it was Ali who adorned the caliphate."