Are Prophets Infallible?
Question

I would like to ask a question about `Aqeedah. Is it part of our `Aqeedah to believe that the Prophets committed sins and were not infallible?
Praise be to Allah.Are Prophets infallible?
The Prophets are the best of mankind, and the most noble of creation before Allah. Allah chose them to convey the call of La ilaha ill-Allah (none has the right to be worshipped but Allah) to mankind, and Allah has made them the intermediaries between Him and His creation in conveying His Laws. They were commanded to convey the message from Allah, as He says (interpretation of the meaning): 
 “They are those whom We gave the Book, Al-Hukm (understanding of the religious laws), and Prophethood. But if these disbelieve therein (the Book, Al-Hukm and Prophethood), then, indeed We have entrusted it to a people (such as the Companions of Prophet Muhammad) who are not disbelievers therein.” [Al-An`am 6:89] 
The Prophets’ task was to convey the message from Allah even though they were human, hence the issue of infallibility may be examined from two angles: 

Infallibility in conveying the message
Infallibility from human error 

Infallibility of Prophets in conveying the message
The Prophets were infallible in conveying the message from Allah. They did not conceal anything that Allah had revealed to them, and they did not add anything from themselves. Allah said to His Prophet Muhammad (peace and blessings of Allah be upon him) (interpretation of the meaning): 
 “O Messenger (Muhammad)! Proclaim (the Message) which has been sent down to you from your Lord. And if you do not, then you have not conveyed His Message. Allah will protect you from mankind.” [Al-Ma'idah 5:67] 
“And if he (Muhammad) had forged a false saying concerning Us (Allah), We surely would have seized him by his right hand (or with power and might),  And then We certainly would have cut off his life artery (aorta), And none of you could have withheld Us from (punishing) him.” [Al-Haqqah 69:44-47]
Allah also says (interpretation of the meaning): 
“And he (Muhammad) withholds not a knowledge of the Unseen.” [Al-Takwir 81:24]
Shaykh `Abd Ar-Rahman ibn Sa`di (may Allah have mercy on him) said in his commentary on this verse: “He is not stingy with that which Allah has revealed to him, concealing some of it. Rather he (peace and blessings of Allah be upon him) was the most trustworthy of the inhabitants of heaven and the people of earth, the one who conveys the message of his Lord, the faithful conveyor (of the message). He does not withhold any part of it, from rich or poor, from ruler or subject, from male or female, from city-dweller or Bedouin. Hence Allah sent him to an illiterate and ignorant nation, and he (peace and blessings of Allah be upon him) did not die until they had become knowledgeable scholars, steeped in knowledge…”
Thus, with regard to conveying the religion of his Lord, the Prophet (peace and blessings of Allah be upon him) did not make any mistakes at all, whether major or minor, rather he was infallible and under the constant protection of Allah. 
Shaykh `Abd Al-`Aziz ibn Baz (may Allah have mercy on him) said in Fatawa Ibn Baz, (6/371): 
“All the Muslims are unanimously agreed that the Prophets (peace be upon them) – especially Muhammad (peace and blessings of Allah be upon him) – are infallible and protected from error in that which they conveyed from Allah. Allah says (interpretation of the meaning): 
“By the star when it goes down (or vanishes). Your companion (Muhammad) has neither gone astray nor has erred. Nor does he speak of (his own) desire. It is only a Revelation revealed. He has been taught (this Quran) by one mighty in power [Gabriel].” [An-Najm 53:1-5]
Our Prophet Muhammad (peace and blessings of Allah be upon him) is infallible in all that he conveyed from Allah, in word and action and in what he approved of. There is no dispute on this point among the scholars.”
The Ummah agreed that the Messengers are infallible in their conveying the message. They did not forget anything that Allah revealed to them, except for things that were abrogated. Moreover, Allah guaranteed His Messenger (peace and blessings of Allah be upon him) that he would remember it and would not forget it, except for that which Allah wanted him to forget, and He guaranteed that he would remember the whole Quran in his heart. Allah said (interpretation of the meaning): 
“We shall make you recite (the Quran), so you (O Muhammad) shall not forget (it).” [Al-A’la 87:7] 
“It is for Us to collect it and to give you (O Muhammad) the ability to recite it (the Quran). And when We have recited it to you [O Muhammad through Jibreel (Gabriel)], then follow its (the Quran’s) recitation.” [Al-Qiyamah 75:17-18]
Shaykh Al-Islam [Ibn Taymiyyah (may Allah have mercy on him)] said in Majmu` Al-Fatawa, 18/7]: 
“The verses which point to the Prophethood of the Prophets indicate that they are infallible with regard to the message that they convey from Allah, so what they convey from their Lord can only be true. This is the meaning of Prophethood and this implies that Allah tells [the Prophet] of the unseen and he tells the people of the unseen. So the Messenger is commanded to call people and to convey the message to them.” 
Infallibility of the Prophets from human errors
With regard to the Prophets as people, they may make mistakes. This may be discussed as follows: 
They do not commit major sins
With regard to major sins, the Prophets do not commit major sins at all , and they are protected from such major sins both before their missions began or afterwards. 
Shaykh Al-Islam Ibn Taymiyyah (may Allah have mercy on him) said in Majmu` Al-Fatawa, 4/319: 
“The view that the Prophets are infallible and protected against committing major sins , as opposed to minor sins, is the view of the majority of Muslim scholars and of all groups. It is also the view of the scholars of Tafsir and Hadith and jurists. Indeed, nothing has been narrated from any of the Salaf, Imams, the Companions, the generation after them, and those who followed them except that which is in accordance with this view.” 
Matters that have nothing to do with conveying the message and the revelation 
With regard to minor sins, these may be committed by them, or by some of them. Hence the majority of scholars are of the view that they are not infallible when it comes to minor sins. Nonetheless, if they committed such actions they were not left to persist therein, rather Allah pointed that out to them and they hastened to repent therefrom. 
The evidence that they might commit minor sins and that they were not left to persist therein is:

The verses in which Allah says of Adam (interpretation of the meaning): 

“Thus did Adam disobey his Lord, so he went astray.  Then his Lord chose him, and turned to him with forgiveness, and gave him guidance.” [Ta-Ha 20:121-122] 
This indicates that Adam committed sin, but he was not left to persist therein, and he repented to Allah from that. 

Also, Allah says (interpretation of the meaning): 

“He said: `This is of Satan’s doing, verily, he is a plain misleading enemy.’ He said: `My Lord! Verily, I have wronged myself, so forgive me.’ Then He forgave him. Verily, He is the Oft-Forgiving, the Most Merciful.” [Al-Qasas 28:15-16]
So Moses (peace be upon him) confessed his sin and sought forgiveness from Allah after he killed the Egyptian, and Allah forgave him his sin.

Allah says (interpretation of the meaning): 

“…and he [Dawud] sought forgiveness of his Lord, and he fell down prostrate and turned (to Allah) in repentance. So We forgave him that, and verily, for him is a near access to Us, and a good place of (final) return (Paradise).” [Sad 38:23-24]
Dawud’s sin was hastening to pass judgement before hearing the case of the second disputant.

Our Prophet Muhammad (peace and blessings of Allah be upon him) was rebuked by his Lord for several things that are mentioned in the Quran, such as the following (interpretation of the meaning): 

 “O Prophet! Why do you forbid (for yourself) that which Allah has allowed to you, seeking to please your wives? And Allah is Oft-Forgiving, Most Merciful.” [At-Tahrim 66:1]
This refers to the well-known story with some of his wives.

Allah also rebuked His Prophet (peace and blessings of Allah be upon him) concerning the prisoners of war at Badr: 

Muslim (4588) narrated that Ibn `Abbas (may Allah be pleased with him) said: When the prisoners were taken captive, the Messenger of Allah (peace and blessings of Allah be upon him) said to Abu Bakr and `Umar (may Allah be pleased with them): “What do you think about these prisoners?” Abu Bakr said: “O Prophet of Allah, they are our cousins and kinsmen. I think that we should accept a ransom from them which will give us some support against the disbelievers, and perhaps Allah will guide them to Islam.” The Messenger of Allah (peace and blessings of Allah be upon him) said: “What do you think, O Ibn Al-Khattab?” He said: “I say, no, by Allah, O Messenger of Allah. I do not agree with Abu Bakr. I think that you should hand them over to us so that we may strike their necks (execute them). Hand over `Aqil to `Ali so that he may strike his neck, and hand over So and so – a relative of `Umar – to me, for these are the leaders and veterans of disbelief.” The Messenger of Allah (peace and blessings of Allah be upon him) liked what Abu Bakr said and he did not like what I [`Umar] said. The next day I came and found the Messenger of Allah (peace and blessings of Allah be upon him) and Abu Bakr weeping. I said: “O Messenger of Allah, tell me, what has made you and your companion weep? If there is a reason to weep, I will weep with you, and there is no reason, I will force myself to weep in sympathy with you because you are weeping.” The Messenger of Allah (peace and blessings of Allah be upon him) said: “I am weeping because I was shown the torture to which they were subjected. It was brought as close to me as this tree” – a tree which was near the Prophet of Allah (peace and blessings of Allah be upon him) – then Allah revealed the words (interpretation of the meaning): 
“It is not for a Prophet that he should have prisoners of war (and free them with ransom) until he had made a great slaughter (among his enemies) in the land. You desire the good of this world (i.e. the money of ransom for freeing the captives), but Allah desires (for you) the Hereafter. And Allah is All-Mighty, All-Wise.
Were it not a previous ordainment from Allah, a severe torment would have touched you for what you took.
So enjoy what you have gotten of booty in war, lawful and good.” [Al-Anfal 8:67-69]
So Allah permitted booty to them. 
From this Hadith it is clear that when the Prophet (peace and blessings of Allah be upon him) chose to ransom the prisoners, this was a decision that he made by Ijtihad after consulting his companions, and he had no revelation from Allah concerning that. 

The words of Allah (interpretation of the meaning): 

“(The Prophet) frowned and turned away.
Because there came to him the blind man (i.e. `Abdullah ibn Umm Maktum, who came to the Prophet while he was preaching to one or some of the Quraysh chiefs).” [`Abas 80:1-2]
This is the famous story of the great companion `Abdullah ibn Umm Maktum (may Allah be pleased with him) and the Messenger of Allah (peace and blessings of Allah be upon him), when Allah rebuked him. 
Shaykh Al-Islam Ibn Taymiyyah (may Allah have mercy on him) said in Majmoo’ Al-Fatawa (4/320): 
“What has been narrated from the majority of scholars is that they (the Prophets) are not infallible with regard to minor sins, but they are not left to persist therein. They do not say that this does not happen under any circumstances. The first group from whom it was narrated that they are infallible in all cases, and who say that the most, are the Rafidis (Shi’ah), who say that they are infallible and protected even against forgetfulness and misunderstanding.” 
Some people think this is too much to suggest that Prophets may commit sin, and misinterpret some of the texts of the Quran and Sunnah which indicate that. Two specious arguments lead them to do that: 

The fact that Allah has commanded us to follow the Messengers and take them as our example. The command to follow them is taken as meaning that everything they did is an example for us to follow, and that every action and belief of theirs is an act of worship. If we suggest that that the Messenger (peace and blessings of Allah be upon him) committed a sin, there will be a dilemma, because that implies that we are commanded to imitate this sin which was committed by the Prophet because we are commanded to follow his example, but at the same time we should no agree with it or do it, because it is a sin.  

This argument is valid and is appropriate if the sin is hidden and not obvious in such a way that it could be confused with acts of obedience. But Allah has explained to His Messengers where they went wrong and enabled them to repent without delay. 

Sins contradict perfection and are a shortcoming. This is true if they are not accompanied by repentance, for repentance brings forgiveness of sin, and does not contradict perfection or bring blame upon a person. Rather in many cases a person may be better after repenting than he was before he fell into sin. It is well known that no Prophet committed sin but he hastened to repent and seek forgiveness. The Prophets did not persist in sin or delay repentance, for Allah protected them from that, and after repenting they became more perfect than they were before.   

Unintentional mistakes with regard to some worldly matters
With regard to mistakes in some worldly matters, it is permissible for them to make such mistakes although their reason is sound and their insight is strong. This happened to several of the Prophets including our Prophet Muhammad (peace and blessings of Allah be upon him). This happened with regard to various spheres of life such as medicine, agriculture, etc. 
Muslim (6127) narrated that Rafi ibn Khadij (may Allah be pleased with him) said: The Prophet of Allah (peace and blessings of Allah be upon him) came to Madinah and found them pollinating the palm trees. He said: “What are you doing?” They said: “We always do this.” He said: “Perhaps if you do not do it, that will be better.” So they did not do it, and the harvest failed. They told him about that and he said: “I am only human. If I tell you to do something with regard to your religion, then do it, but if I tell you to do something based on my own opinion, then I am only human.” Hence it is known that the Prophets are infallible and protected from error with regard to the Revelation, so we should beware of those who cast aspersions upon the Messenger’s conveying of the Message and about laws he legislated, and say that it is his own personal opinion. The Prophet (peace and blessings of Allah be upon him) could never do such a thing. Allah says (interpretation of the meaning): 
“Nor does he speak of (his own) desire.
It is only a Revelation revealed.” [Al-Najm 53:3-4]
The Standing Committee was asked: Do the Prophets and Messengers make mistakes? 
They replied: 
“Yes, they make mistakes but Allah does not let them persist in their mistakes, rather He points out their mistakes to them as a mercy to them and their nations, and He forgives them for their mistakes, and accepts their repentance by His Grace and Mercy, for Allah is Oft-Forgiving, Most Merciful, as will be clear to anyone who studies the verses of the Quran which speak of that.” (Fatawa Al-Lajnah Al-Da’imah, 3/194) 
And Allah knows best.