ʿAlī ibn Abī Ṭālib (عَلِيّ بْن أَبِي طَالِب; 600 – 661 CE) was the last Caliph of the Rashidun Caliphate, the successor state to the Islamic prophet Muhammad's political dominions. He is considered by Shia Muslims to be the first Imam, the rightful religious and political successor to Muhammad. The issue of succession caused a major rift between Muslims and divided them into two major branches: Shia following an appointed hereditary leadership among Ali's descendants, and Sunni following political dynasties. Ali's assassination in the Grand Mosque of Kufa by a Kharijite coincided with the rise of the Umayyad Caliphate. The Imam Ali Shrine and the city of Najaf were built around Ali's tomb and it is visited yearly by millions of devotees.
Ali was a cousin and son-in-law of Muhammad, raised by him from the age of 5, and accepted his claim of divine revelation by age 11, being among the first to do so. Ali played a pivotal role in the early years of Islam while Muhammad was in Mecca and under severe persecution. After Muhammad's relocation to Medina in 622, Ali married his daughter Fatima and, among others, fathered Hasan and Husayn, the second and third Shia Imams.
Muhammad called him his brother, guardian and successor, and he was the flag bearer in most of the wars and became famous for his bravery. On his return from the , Muhammad uttered the phrase, "Whoever I am his Mawla, this Ali is his Mawla." But the meaning of Mawla became disputed. Shias believed that Ali was appointed by Muhammad to lead Islam, and Sunnis interpreted the word as friendship and love. While Ali was preparing Muhammad's body for burial, a group of Muslims met and pledged allegiance to Abu Bakr. Ali pledged allegiance to Abu Bakr, after six months, but did not take part in the wars and political activity, except for the election of Uthman, the third caliph. However, he advised the three caliphs in religious, judicial, and political matters.
After Uthman was killed, Ali was elected as the next Caliph, which coincided with the first civil wars between Muslims.