Imāmah () means "leadership" and is a concept in Twelver theology. The Twelve Imams are the spiritual and political successors to Muhammad, the Prophet of Islam, in the Twelver branch of Shia Islam. According to Twelver theology, the successors to Muhammad are infallible human beings, who rule justly over the community and maintain and interpret sharia and undertake the esoteric interpretation of the Quran. The words and deeds of Muhammad and the Imams guide the community. For this, the Imams must be free from error and sin and chosen by divine decree—nass—through the Prophet.

Shi'a believe that divine wisdom—'Aql—is the source of the souls of the Prophets and Imams and gives them esoteric knowledge—hikmah—and that their suffering is a means by which their devotees may acquire divine grace. The Imam is not the recipient of divine revelation, but has a close relationship with God, who guides him, allowing the Imam in turn to guide others. The Imamat, or belief in the divine guide, is a fundamental belief in Shia Islam and is based on the concept that God would not leave humanity without access to divine guidance.

According to the Twelvers, an Imam of the Age is always the divinely appointed authority on all matters of faith and law. Ali was the first Imam in this line and in the view of Twelvers the rightful successor to Muhammad, followed by the male descendants of Muhammad through his daughter Fatimah. Each Imam was the son of the previous Imam, with the exception of Husayn ibn Ali, who was the brother of Hasan ibn Ali. The twelfth and final Imam is Muhammad al-Mahdi, who is believed by the Twelvers to be alive and in hiding.

Function of imam The office of imamate is bestowed upon the figure of imam (), whose function in Sunni Islam is to implement the divine law and manage the community affairs. In this sense, imam is synonymous to caliph in Sunni Islam as the highest temporal authority, but this authority is limited and mundane.

In Shia Islam, the figure of imam dominates the belief system. Necessarily a descendant of the Islamic prophet Muhammad, imam is the supreme leader that combines both temporal and religious authorities, for the two were combined in Muhammad. Various Shia sects disagreed over the identity of these imams.

In Twelver Shi’ism, Muhammad is believed to have been succeeded by a line of twelve imams from his descent, who also inherited his divine knowledge of religion. Even though these twelve imams are thought to have been entitled, through a divine mandate, to the temporal authority to manage Muslim affairs, their status in Twelver Shi’ism does not depend upon it, as they instead owe their status to their divinely-sanctioned designation by their predecessors (). Temporal leadership only materialized for the first of the twelve imams, Ali ibn Abi Talib, who reigned from 661 CE until his assassination in 665.

Exoteric function Whereas Muhammad brought divine revelation and taught divine law to his followers, the twelve imams interpreted the revelation and safeguarded the religion against innovations in their capacity as law-givers and guardians of religion. At this exoteric level, many teachings of these imams are general enough to be accepted by Sunnis, who regard many of the imams as outstanding religious scholars.

Esoteric function In addition to their exoteric function, the twelve imams, by virtue of their divine knowledge, are regarded as the sole authoritative guides toward salvation, as they initiated a small group of their followers into esoteric aspects of the religion. This function of imams, as spiritual guides after Muhammad, is known as or , which is described as the esoteric aspect of prophecy. In his capacity as an imam, Muhammad was also a spiritual guide. also denotes the exclusive religio-political authority of imams.

To sum, in Twelver Shi'ism, the twelve imams hold the ultimate religious authority, both in matters of law and spiritual guidance, as an extension of Muhammad's authority. Their duty is essentially threefold: first, rule the community as Muhammad's rightful successors, second, teach hidden aspects of the revelation and authoritatively interpret ambiguous verses of the Quran, and third, guide men in their spiritual life.

At an even more esoteric level, imams are often regarded as intermediaries between God and mankind. In this world, they are thought to be the cause for the creation, and the source of sustenance and divine blessings for creatures, thus maintaining all life on Earth. In the hereafter, they intercede for many, especially for their followers. By contrast, the prerogative of intercession is limited to the Islamic prophet in Sunni Islam. However, some Shia scholars reject such supernatural functions.

Existence of imam In Twelver Shi'ism, existence of imam is regarded as a continuous and rational necessity. For instance, one rational argument in favor of imamate contends that mankind has a permanent need for a divinely-guided (infallible) leader and an authoritative teacher in religion, one that would expound the divine law and correctly interpret the revelation. As the high custodian of religion, this leader would also execute the divine law and judge among men. Existence of such a leader, it is argued, is necessary for the welfare and salvation of the community.

Providing this figure, called imam, is therefore incumbent upon God at any moment, as an obligatory grace (), for He acts in the best interest of His creation. Conversely, absence of such an imam would imply that God is both uncaring, for He has neglected His creation, and unjust, for He would punish men without providing them with right guidance. Just as it is incumbent upon God to send prophets who would teach mankind divine knowledge, it is incumbent upon Him to preserve and expound this knowledge through imams. That is, imamate in Twelver Shi'ism is regarded as the continuation of prophecy.

It is thus argued that imamate is a continuous necessity, that is, Earth has never been devoid of imams. There could only be one such imam at any time. As long as he lived, his successor would be a silent () imam.

Qualifications of imam Divine designation and divine knowledge, both of which the imam inherits through his successor from Muhammad, are the key markers of imamate in Twelver Shi'ism.

Divinely-sanctioned designation () In Twelver doctrine, imamate is confined to certain descendants of the Islamic prophet Muhammad, from the marriage of his daughter Fatima to his cousin Ali ibn Abi Talib. Every imam is believed to have been designated by his predecessor through a divine mandate, going back successively to the announcement of Muhammad about Ali ibn Abi Talib at the Ghadir Khumm, shortly before the former died in 630. According to Twelvers, the imamate was inherited after Ali by his eldest son Hasan, then by his other son Husayn, and then successively inherited by nine of Husayn's descendants. That is, these twelve imams owe their legitimacy to “apostolic succession,” rather than political leadership.

Except the first three of them, these imams were effectively apolitical. More specifically, they all had claims to political leadership, but did not come forward for they would have been persecuted. The alternative theory is that many of them did not have any political claims at all. At any rate, this hereditary nature of imamate obviously closed the field to outside claimants. Divinely-sanctioned designation () is often accompanied in Shia sources by inheritance of secret religious scrolls and prophet's weapons. The latter paralleled the Ark of the Covenant for the Israelites.

is regraded as a logical necessity in the Twelver doctrine, in which imams are thought to have been infallible, that is, immune from sin and error. Only an infallible imam can correctly identify his infallible successor. The appointment of imam must also be sanctioned by God, for infallibility is a hidden virtue known to God. In particular, the fallible community has no voice in appointing infallible imams, or prophets for that matter.

Divinely-inspired knowledge () Rather than political power, the Twelver doctrine of imamate revolves around the esoteric knowledge () of their quiescenct imams, who are thought to have successively inherited Muhammad's divine knowledge about God. Twelvers hold that their imams did not receive revelation as prophets did but were still divinely-inspired. Imams were spoken to by angels, but, unlike prophets, could not see the angels. Imams are also said to have inherited certain secret texts, such as , , , . For example, supposedly contains the knowledge of what is licit and illicit.

Imams thus perfectly knew exoteric aspects of the religion, such as tradition and jurisprudence, and its esoteric aspects, such as hidden and allegorical interpretations of the Quran, to the point that imam is also called the “speaking Quran.” The near consensus among Twelver scholars is that imams did not have knowledge of the unseen (), but were granted glimpses of it as a divine favor. This was the opinion of al-Mufid (), Sharif al-Murtada (), al-Tusi (), three prominent Twelver scholars.

Alternatively, some have argued that imams were omniscient or nearly so, including Ibn Babawayh (), another prominent Twelver scholar. It is thus said that imams knew the greatest name of God (), the past, the present, and the future. At an even more esoteric level, imams are thought to have manifested the knowable God, that is, what can be known about God to His creation.

Other features of imam Infallibility

As with the Islamic prophet Muhammad, the twelve imams are regarded as infallible in Twelver Shi'ism, that is, protected from sin and error through divine grace. The scope of this has been debated, but at least covers imams’ religious rulings and views.

Infallibility () of imams, in their capacity as divinely-sanctioned leaders, is viewed as a logical necessity in Twelver Shi'ism lest the religion is corrupted, or people are led astray. This infallibility, however, is not viewed as inability to sin. Rather, the esoteric knowledge of prophets and imams, for instance, their vivid understanding of God's punishment, produces a faculty that prevents them from disobedience of God. That is, their infallibility is a byproduct of their divine knowledge. Verse 2:124 is one of the Quranic verses cited to support the infallibility of imams, in which all wrongdoers are excluded from imamate.

Best of men Each imam is the best of men () in his time, that is, most excellent among them in religious qualities, for otherwise, it is argued, God would have appointed someone else as the imam. Similarly, it is argued that imams must be foremost in observing the religious values that they preach. Imamate is ranked even higher than prophethood in Twelver Shi'ism, citing the Quranic story in verse 2:124, where Abraham is promoted to imamate when he is already a prophet.

In particular, there is total consensus that the twelve imams are the most superior amongst humans born on Earth following Muhammad's birth, with some saying that they even exceed some or even all prophets except Muhammad himself. This is often justified because Muhammad inherited the total knowledge of all prophets, and the twelve imams in turn inherited Muhammad's superior knowledge, although, historically there have been disagreements on the twelve imams ranking in contrast to the other prophets with a cohort even believing that the twelve imams do not exceed any prophet at all.

Amongst the twelve imams themselves, some are believed to have been equal in knowledge, although some of them, like Ali ibn Abi Talib (and Hassan and Hussain to a lesser extent), may have been superior to the rest in rank. This also implied that every new piece of divine knowledge was presented first to the imam's predecessors and then to him.