In contrast to the Sunni school of thought, the Shia believe that the imam is equal to the prophet in all matters other than receiving revelation. Therefore, he has to be infallible from sin and mistake just like the prophets. Nevertheless, Sunnis believe imamate to be a social rank, not a divine one, which is given to the imam by the people through their choice. As a result, they don’t believe infallibility to be one of its main conditions.
The logical and traditional (hadithic) reasoning of the Shia:
1- The sound mind easily comprehends that the imam, who is to explain and preserve religion, must be capable of being totally trusted by the people, and infallible from all sin and mistake, enabling him to fulfill his responsibility and preserve religion. The reason being that the goal in sending messengers and imams is to teach and train the laity, which calls for abundant and profound knowledge given by Allah (swt), that they must transfer without any alteration to the people. This can only be done thoroughly if they are infallible. In addition to this, the reason for why it is necessary for Allah (swt) to appoint who will be imam, and that it isn't up to the people, is another reason for their infallibility.
2- There are both verses and correct and authentic hadiths that tell us of the infallibility of the imams, such as the verses of Tathir, Imamah, Ita’ah, and the hadiths of Thaqalain and Manzilah.
Also, the Shia believe that imamate, which is succession to the prophet (pbuh), as with prophethood, is a rank that is appointed by Allah (swt), not one that the people have a say in. In other words, the infallible is one who is never subject to error and also, never commits sins, neither openly, nor secretly, making the only way to be able to identify him, divine appointment.
1- “Imam” literally means leader; Raghib says that an imam is a person followed by others.
2- In theological terms, there are different definitions for who the imam is.
Sunnis believe that imamate is a universal leadership that is responsible for encouraging the people to preserve both their worldly and otherworldly benefits and to refrain from what is to their loss and harm.
But according to the Shia school of thought, imamate is a general and universal leadership regarding the people’s worldly and otherworldly affairs, as a succession to the prophet (pbuh).
3- The meaning and concept of infallibility: Ismah or infallibility literally means to protect and block something and in theology, refers to an inner state [of the individual] that not only doesn’t allow one to sin and disobey divine orders, but also blocks him/her from even being subject to error.
To put it another way, the infallible is one who never accidentally nor purposely disobeys a religiously obligatory act, although he/she has the power and choice to.
The Shia believe that imamate is a continuation of prophethood, the only difference being that the prophet (pbuh) is the founder of religion and receives revelation, while the imam is responsible for explaining, clarifying and preserving religion. Therefore, the imam is equal to the prophet (pbuh) in everything except in receiving revelation. Everything that the prophet (pbuh) must possess such as a profound knowledge of the fundamentals and branches of Islam and its teachings, are also possessed by the imam; one of those requirements being infallibility and invulnerability to sin and even error. Since there is no way for us to be able to identify one who is infallible, there is no choice but for Allah (swt) or the prophet (pbuh) to do so and introduce him, as goes with prophethood. Therefore, both prophets and imams have to be appointed by Allah (swt).
On the other hand, the Sunni account is that society and the people are the ones to determine who is to have the important social and religious rank of imamate and authority, not Allah (swt). These two approaches can be deduced from the two definitions there are for imamate.
Here we would like to point to some of the reasoning the Shia have for their claims:
1) Rational reasoning for why the imam must be infallible
a) Since the imam is to preserve and explain religion and train individuals, he should be able to be trusted one hundred percent and such can only be accomplished if he is infallible.
b) In the case of an imam sinning, he will lose his respect and admiration and will no longer be followed, defeating the whole purpose of having an imam in the first place.
c) If the imam wasn’t to be infallible and was to be prone to sin, his condemnation would be obligatory upon others as a form of ‘enjoining good and forbidding evil’, while such an encounter with the imam would first of all once again defeat the purpose of imamate and secondly, be in contradiction with verse 59 of surah Nisa’, because in this verse, the absolute obedience of the imam and respect for his rank has been demanded.
d) As with the prophet (pbuh), the imam is a protector of religion, hence the necessity of his infallibility. The reason being that both theoretical and practical protection are his responsibility, which can clearly only be achieved through infallibility from both sin [for the practical part] and error and forgetfulness [for the theoretical part]. If the imam was not to be infallible, he would surely at least make mistakes [if not sin] and that would mean his failure in protecting and explaining a portion of religion, which would mean that portion isn't of importance to Allah (swt), while we are sure that isn't the case, because all of religion is important to Him and that is why He has sent the prophet (pbuh); to transfer it in its entirety to us.
e) As was said, one of the reasons for having an imam is for him to guide the people and prevent them from making mistakes which usually ends in their misguidance and straying from the straight path; if the imam is to also make mistakes then how is he supposed to help others? In that case, he himself will be in need of another imam to notify him of his own mistakes, and so will the next imam and so on so forth. This series of imams must eventually end with an imam that is actually infallible and possesses the capability of guiding others without being vulnerable to error or sin himself.
2- Traditional Reasoning
Some verses can be found in the Quran on the infallibility of the prophets and imams, namely:
a) The verse of imamate: “When the Creator and Nurturer of Ibrahim tried him with certain words of commands, which he fulfilled Allah stated to him:" Verily, I will, Appoint you a Divine Leader for Mankind." Ibrahim said:" And also from my offspring?" Allah stated:" My covenant does not reach the wrongdoers”. This verse clearly states that Allah’s (swt) covenant, which is the rank of imamate, does not reach the wrongdoers and as we all know, any sin, no matter how small, is wrongdoing and to the dislike of Allah (swt), as another verse says: “These are Allah's bounds, so do not transgress them, and whoever transgresses the bounds of Allah it is they who are the wrongdoers”. According to this verse, whether the sin is a great one or a small one, it is considered wrongdoing, because it is the disobedience of Allah (swt) and the crossing of His boundaries. Back to the verse before this one; two points have been clearly made by it:
i) All sins, great or small, are wrongdoing, because they are the disobedience of Allah (swt).
ii) Allah’s (swt) covenant does not reach the wrongdoers.
Conclusion: Imamate is a divine covenant and rank and the Quran says that it solely belongs to those who are totally free from wrongdoing. Therefore, the imams are totally free from any form of wrongdoing.
b) The verse of tathir or “purification”: “Indeed Allah desires to repel all impurity from you, O People of the Household, and purify you a thorough purification”.
This verse indicates that the household of the prophet (pbuh) are infallible, because “impurity” which has been mentioned in the verse covers all spiritual, knowledgeable and practical impurity, in which sin is an instance of. One question that might come to mind is that in the verse, it has been said that Allah (swt) “desires” such a matter, so why don’t we say that all the verse is saying is that Allah (swt) likes them [the household of the prophet (pbuh)] to be good people and free of all impurity, just like He wants all of us to be good people; so what does this verse have to with infallibility? The answer is, what was said is true; Allah (swt) does want them to be free of all impurity, but that isn't something that He only wants from the household of the prophet (pbuh); it’s something He wants from all people. In that case, why is the Quran saying that He only wants such a thing from a small group, not everyone? This is where the significance and distinctiveness of the verse manifests; it is because Allah’s “desire” here differs from His desire in other verses of the Quran. Here His “desire” denotes His iradah takwiniyyah (generative will), meaning that He actually makes them free of and repels all impurity from them, or else if in the verse “desiring” was to denote iradah tashri’i (legislative will and authority), it wouldn’t make sense, because the main reason for the creation of all of us is to be free from sin an impurity, not just a certain group, hence the meaning of “generative will”.
c) The verse of ita’ah or “obedience”: “O you who have faith! Obey Allah and obey the Apostle and those vested with authority among you”.
This verse is also one of the verses that indicates the infallibility of the imams, because it hasn’t made the obedience of the prophet (pbuh) and imams dependant on anything else and has left it absolute. The only way what this verse says can be justified is to say that their obedience is an in line with obeying Allah (swt) and that there is never any contradiction between obeying them and what Allah (swt) wants from us; such can only be achieved if they are infallible, because if it wasn’t so, and they were prone to error and sin, there would certainly be times where their obedience would be in contradiction with Allah’s (swt) command as a result of their error.
d) The hadith of thaqalain or “the two weighty and precious things”:
This hadith is a mutawatir one, meaning that it has been narrated by so many different narrators so much that one becomes certain and absolutely sure that they couldn’t have all been mistaken or agreed to forge it together, as a result one is sure that the prophet (pbuh) or imam has actually said that hadith. Both Shia and Sunni narrators have narrated this hadith: “I am leaving behind amongst you two precious and weighty things! Allah’s (swt) book and my progeny (my household); the two will never part until they come to me next to the pool of kawthar [in paradise].
According to this hadith, the prophet (pbuh) has considered his progeny and household to be equal to the Quran, saying that the two will never separate. This is also clear proof of their infallibility, because even the smallest sin accidentally is considered practically parting from the Quran. Therefore, just as mistake has no way in the Quran, it also has absolutely no way in the progeny of the prophet (pbuh) and they are totally free of it.
Now that it has been clarified that the imam, who is the successor to the prophet (pbuh) must be infallible from both sin and mistake, there is no way to identify who the infallible is unless Allah (swt) lets us know, because He is the only one who is totally aware of the insides and spirits and concealed secrets of all people.
Here, we will briefly list some of the traditions that have mentioned who the infallibles are:
One of the most direct and clearest cases in which the prophet (pbuh) has mentioned Imam Ali (as) as his successor, which is accepted by both Shia and Sunni narrators and scholars is what he has said on the occasion of Ghadir Khum, whenhe was divinely ordered to appoint Ali (as) as his successor. He said: “Whosoever I am his master, Ali (as) is his master [after me]!”
Or when the prophet (pbuh) addressed his companions saying: “Be in total submission to him [Ali (as)] in governing and ruling over the believers.”
Also on another occasion, the prophet (pbuh) raised Ali’s (as) hand and pointed at him saying: “This is Ali, my successor and the one to take my place after me, so listen to and obey him.”
There are also hadiths both by the prophet (pbuh) and the imams (as) on who is to be the following imam. For instance, concerning Imam Husain (as), the prophet (pbuh) has been narrated saying: “This is my son, an imam, the son of an imam, the brother of an imam and father to nine imams after him, the ninth being the ‘standing’ [awaiting] one. He [Imam Husain (as)] is the proof, the son of the proof, the brother of the proof, and father to nine proofs.”
To keep it short, we will leave it at this one hadith. For further information, you can refer to the following books: Ibn Meitham Bahrani, Al-Najatu fil-Qiyamah; Safi Golpaygani, Muntakhabul-Athar, Allamah Amini, Al-Ghadir, and the following subjects:
1- The infallibility of the prophets from a Quranic perspective, Question 112 (Site: 998).
2- The infallibility of normal people, Question 104 (Site: 961)
3- The reason for limiting the infallibles to a few individuals, Question 243 (Site: 1850).
 Raghib Isfahani, Mufradat Alfadhil-Quran, under the root word " امام "
 “الامامة رئاسة عامة دینیة مشتملة علی ترغیب عموم الناس فی حفظ مصالحهم الدینیة و الدنیا ویه و زجرهم عمایضرهم بحسبها” Khajeh Nasiruddin Tusi, Qawaidul-Aqaid, pg. 108.
 “الامامة رئاسة عامة فی امور الدین و الدنیا خلافة عن النبی” Ala’uddin Qushji, Sharh Tajrid, pg. 472.
 “ان العصمة ملکة تقتضی عدم مخالفة التکالیف اللزومیه عمداً و خطاءً مع القدرة علی الخلاف” Mohammad Ridha Modhaffar, Dala’ilul-Sidq, vol. 2, pg. 4.
 The prophet of Islam (pbuh) said to Ali (as): “You compared to me are like Harun (pbuh) compared to Musa (pbuh), except that there is no prophet after me.” (انت منی بمنزلة هارون من موسی الا انه لانبی بعدی) Sirah ibn Hisham, vol. 2, pg. 52.
 Mohammad Ridha Modhaffar, Dala’ilul-Sidq, vol. 2, pp. 8-10.
 Mohammad Hosain Mokhtari Mazandarani, Emamat va Rahbari, pg. 59.
 “و اذا بتلی ابراهیم ربه... قال لاینال عهدی الظالمین” Baqarah:124.
 “تلک حدود الله فلاتعتدوها و من یتعد حدود الله فاولئک هم الظالمون…” Baqarah:229.
 So it has nothing to do with the choice of the people, but is granted by Allah (swt) to those who are qualified and deserve such a rank. Of course, for this rank to be accepted by the people, it depends on their choice and allegiance to the imam.
 Infallibility doesn’t mean that for instance, the angel Jibra’il takes their hand and doesn’t allow them to do so (although if he did, they surely wouldn’t), what is meant is that infallibility is a result of faith. If a person has faith in Allah (swt) and sees and feels Him with his heart, sinning becomes impossible. Not that he is forced to, he just can't, because it is like he is seeing Allah (swt) and seeing the bad and harsh consequences of the sin. After being created from the purest materials, as a result of self-discipline and obtaining great virtues, the infallibles continuously see themselves in the presence of Allah (swt) (who is All-Seeing and All-Knowing). Imam Khomeini, Nobovvat az Didgahe Imam Khomeini (Prophethood from Imam Khomeini’s Perspective), Tebyan, pg. 124.
 “... انما یرید الله لیذهب عنکم الرجس اهل البیت و یطهرکم تطهیرا” Ahzab:33.
 Ahzab:33; Ma’idah:6 in the part of the verse that is speaking of Wudhu and says: “but Allah wishes to purify you”. (In these verses, Allah (swt) is addressing all people and telling them that He wants to purify them).
 Jafar Subhani, Manshoure Aqa’ede Emamiyyeh, pp. 168-169. It should be noted that when Allah (swt) makes the imams infallible, it doesn’t mean they are deprived of free will and choice, just like how the prophets aren't deprived of it as a result of their infallibility.
 “یا ایها الذین آمنوا اطیعوا الله واطیعوا الرسول و اولی الامر منکم...” Nisa:59.
 Mohammad Taqi Misbah Yazdi, Amouzeshe Aqa’id, pg. 203.
 “من کنت مولاه، فهذا علی مولاه” Allamah Amini, Al-Ghadir, vol. 1, pg. 207; Ibn Meitham Bahrani, Al-Najatu fil-Qiyamah fi Tahqiq Amril-Imamah, pg. 81.
 “سلموا علیه بإمرة المؤمنین” Ibid.
 “هذا خلیفتی من بعدی فاسمعوا له و اطیعوا” Ibid.
 “ابنی هذا امام ابن امام اخوا امام ابوائمه تسعة، تاسعهم قائمهم، حجة ابن حجة اخو حجة ابو حجج تسع” Ibn Meitham Bahrani, Al-Najatu fil-Qiyamah fi Tahqiq Amril-Imamah, pg. 167.