Do the Angels Possess Infallibility?
From certain verses of the Qur’an, we can deduce that angels do not possess infallibility and are subject to making mistakes. The verse Al-Baqarah: 102, discusses a situation regarding Hārūt and Mārūt in Bābul (Babylon), which seems to suggest that angels are fallible. However, from several other verses such as Al-Anbīya’: 26- 27, Al-Naḥl: 49- 50, Al-Taḥrīm: 6, and Al-Anbīya’: 20, imply that angels are not subject to the disobedience of Allah and always in His remembrance, hence infallible. These two views are in contradiction to one another, one suggests they are infallible whereas the verse regarding Hārūt and Mārūt suggest they were not.
Detailed explanation of the dubiety
The verse that attributes sin to the two angels:
«وَ اتَّبَعُوا مَا تَتْلُو الشَّياطِينُ عَلَى مُلْكِ سُلَيمَانَ و َمَا كَفَرَ سُلَيمَانُ وَلَكِنَّ الشَّياطِينَ كَفَرُوا يعَلِّمُونَ النَّاسَ السِّحْرَ وَ مَا أُنْزِلَ عَلَى الْمَلَكَينِ بِبَابِلَ هَارُوتَ وَ مَارُوتَ وَ مَا يعَلِّمَانِ مِنْ أَحَدٍ حَتَّى يقُولَا إِنَّمَا نَحْنُ فِتْنَةٌ فَلَا تَكْفُرْ فَيتَعَلَّمُونَ مِنْهُمَا مَا يفَرِّقُونَ بِهِ بَينَ الْمَرْءِ وَزَوْجِهِ وَ مَا هُمْ بِضَارِّينَ بِهِ مِنْ أَحَدٍ إِلَّا بِإِذْنِ اللَّهِ وَ يتَعَلَّمُونَ مَا يضُرُّهُمْ وَ لَا ينْفَعُهُمْ وَ لَقَدْ عَلِمُوا لَمَنِ اشْتَرَاهُ مَا لَهُ فِي الْآخِرَةِ مِنْ خَلَاقٍ وَ لَبِئْسَ مَا شَرَوْا بِهِ أَنْفُسَهُمْ لَوْ كَانُوا يعْلَمُونَ»
"And they followed what the devils pursued during Solomon’s reign —and Solomon did not turn faithless, but it was the devils who were faithless— teaching the people magic, and what was sent down to the two angels at Babylon, Hārūt and Mārūt, and they would not teach anyone without telling [him], ‘We are only a test, so do not be faithless.’ But they would learn from those two that with which they would cause a split between man and his wife —though they could not harm anyone with it except with Allah’s leave. And they would learn that which would harm them and bring them no benefit; though they certainly knew that anyone who buys it has no share in the Hereafter. Surely, evil is that for which they sold their souls; had they known!" [Al-Baqarah: 102]
The verse explains how Hārūt and Mārūt committed a sin against Allah, by teaching man saḥr (magic). Furthermore, teaching mankind this practice was very clearly prohibited.
Verses which imply that the angels are infallible:
«وَ قالُوا اتَّخَذَ الرَّحْمنُ وَلَداً سُبْحانَهُ بَلْ عِبادٌ مُكْرَمُونَ لا یَسْبِقُونَهُ بِالْقَوْلِ وَ هُمْ بِأَمْرِهِ یَعْمَلُونَ»
"They say, ‘The All-beneficent has taken offsprings.’ Immaculate is He! Rather they are [His] honored servants. They do not venture to speak ahead of Him, and they act by His command." [Al-Anbiyā’: 26- 27]
In the above verse Allah has introduced angels to be constantly in the state of servitude and obedience to their Lord. This constant state of obedience suggests infallibility. Several other verses also indicate that the angels possessed this infallibility, as mentioned below:
«وَ لِلَّهِ يَسْجُدُ مَا فىِ السَّمَاوَاتِ وَ مَا فىِ الْأَرْضِ مِن دَابَّةٍ وَ الْمَلَئكَةُ وَ هُمْ لَا يَسْتَكْبرِون(49) يخَافُونَ رَبهُّم مِّن فَوْقِهِمْ وَ يَفْعَلُونَ مَا يُؤْمَرُون(50)»
"To Allah prostrates whatever is in the heavens and whatever is on the earth, including animals and angels, and they are not arrogant. They fear their Lord above them, and do what they are commanded." [Al-Naḥl: 49- 50]
«يا أَيهَا الَّذِينَ آمَنُوا قُوا أَنْفُسَكُمْ وَ أَهْلِيكُمْ نَارًا وَقُودُهَا النَّاسُ وَ الْحِجَارَةُ عَلَيهَا مَلَائِكَةٌ غِلَاظٌ شِدَادٌ لَا يعْصُونَ اللَّهَ مَا أَمَرَهُمْ وَ يفْعَلُونَ مَا يؤْمَرُونَ»
"O you who have faith! Save yourselves and your families from a Fire whose fuel is people and stones, over which are [assigned] angels, severe and mighty, who do not disobey whatever Allah has commanded them, and carry out what they are commanded." [Al-Taḥrīm: 6]
«وَ لَهُ مَنْ فِي السَّماواتِ وَ الْأَرْضِ وَ مَنْ عِنْدَهُ لا يَسْتَكْبِرُونَ عَنْ عِبادَتِهِ وَ لا يَسْتَحْسِرُونَ (19) يُسَبِّحُونَ الَّيْلَ وَ النهارَ لَا يَفْترُون(20)»
"To Him belongs whatever is in the heavens and the earth, and those who are near Him do not disdain to worship Him, nor do they become weary. They glorify [Him] night and day, and they do not flag." [Al-Anbiyā’: 19- 20]
Summary of the verses
We find in the verse Al-Baqarah: 102, two angels by the names Hārūt and Mārūt taught saḥr (magic) to mankind. Individuals would then use this magic to cause separation between husbands and wives. Taking into consideration that the Qur’an has clearly forbidden the use of saḥr, and that Allah would not order the execution of a forbidden act, we can come to the conclusion that these two angels had committed a sin against Allah. But on the other hand, we have verses such as: Al-Anbīya’: 26- 27, Al-Naḥl: 49- 50, Al-Taḥrīm: 6, and Al-Anbiyā’: 20, suggesting that angels never disobey Allah, always in a state of prostration and remembrance of Allah. In other words, angels are infallible to sin. Between these verses we find a contradiction to exist, as infallibility and sinning cannot both go hand in hand.
To nullify saḥr one must have an understanding of it and its forbiddance. In that era, people would see the need to learn and practice saḥr for misconduct and malevolence. Hence, people were in need of saḥr to combat saḥr, or to omit magic in general. Hence, teaching magic to revoke any magic was necessary and therefore not considered a sin. Hārūt and Mārūt taught saḥr for this very purpose. Whilst teaching the people, the angels would constantly remind them that you will be tested through this saḥr and if you use it for ill purpose, it would lead you to turn away from your faith. However, certain Jewish people used this magic to improve spells of magicians of the time, which in return practiced it with ill purposes, such as for causing separation between married couples. Therefore, we can conclude that the mentioned verse does not attribute sin to the two angels and is not at all in contradiction with the other verses.
Prior to answering the dubiety we must first briefly describe Hārūt and Mārūt as well as looking into the nature of magic and when it is required.
First premise - The effects of the circumstances on an action
There are several conditions which constitute to whether an action is positive or negative. Actions of an individual in relation to their positivity or negativity can be split into three categories as such:
- Certain actions always result in either a positive or a negative outcome. In other words, whatever the situation or condition, the result of this action will always be the same. For instance the example of justice and injustice; the result of the first (justice) is always positive and the latter (injustice) is always negative. Under no circumstances is injustice considered positive. Whatever the situation may be, oppression or injustice is not acceptable and will always be unfavorable.
- Actions which are sometimes positive and at other times negative. Depending on the circumstances, the performance of an action could be favorable and at other times due to the change of conditions or scenario, it may become unfavorable and vice versa. For instance taking the life of another human being. Under normal circumstances this act would be considered obscene. But, if we take the example of an individual who intends to unjustly take lives of others and the only course of action to save those lives, would be to take his life. Under these conditions, taking his life would be rationally correct and advised.
- Actions which do not result in good nor bad, rather it does not make a difference whether this action is executed or not. However, under certain conditions or circumstances this action could result in good or bad. For instance the example of walking or sitting would fall under this category. Walking in order to perform theft would be considered negative. Whereas walking to aid another would be considered positive or praiseworthy.
Taking the above into consideration, it is possible that the goodness of an action, due to certain circumstances, can change to bad and vice versa.
Second premise - A brief description of Hārūt and Mārūt
There is a narration from Imām ‘Alī Riḍā regarding Hārūt and Mārūt, it is as follows:
«أَمَّا هَارُوتُ وَ مَارُوتُ- فَكَانَا مَلَكَيْنِ عَلَّمَا النَّاسَ السِّحْرَ لِيَحْتَرِزُوابِهِ سِحْرَ السَّحَرَةِ وَ يُبْطِلُوا بِهِ كَيْدَهُمْ وَ مَا عَلَّمَا أَحَداً مِنْ ذَلِكَ شَيْئاً حَتَّى قَالا إِنَّمَا نَحْنُ فِتْنَةٌ فَلَا تَكْفُرْ فَكَفَرَ قَوْمٌ بِاسْتِعْمَالِهِمْ لِمَا أُمِرُوا بِالاحْتِرَازِ مِنْهُ وَ جَعَلُوا يُفَرِّقُونَ بِمَا تَعَلَّمُوهُ بَيْنَ الْمَرْءِ وَ زَوْجِهِ»
"Hārūt and Mārūt were two angels who taught people saḥr in order to omit the saḥr of magicians, hence keeping the people protected from sorcery. Whilst teaching this art to mankind, they would constantly remind them that "this is a test and do not become faithless." However, the people did just that, they went against that which they were advised and would use saḥr in order to create division." 
Third premise - The nature of magic
The original meaning of saḥr is anything and everything in which Shayṭān has assisted in. A second definition is illusion, or in other words something which seems to be reality but is not. 
Nevertheless, magic is extraordinary which can directly affect people, at times it causes illusion and at others it can cause their figments of imagination to see things. From the study of the Qur’an it seems that there exist two types of saḥr:
A saḥr which plays with the imagination in such a way that it shows us something which is not reality. For example the following verse which discusses the opposition of the magicians against Prophet Mūsā, Allah describes the saḥr of Fir’aun’s magicians as plain trickery and illusion:
«فَإِذا حِبالُهُمْ وَ عِصِيُّهُمْ يُخَيَّلُ إِلَيْهِ مِنْ سِحْرِهِمْ أَنَّها تَسْعى»
"He said, ‘Rather you throw down first.’ Behold, their ropes and staffs appeared to him by their magic to wriggle swiftly." [Ṭā Hā: 66]
This second verse is discussing the same event and describes the saḥr in a similar way:
«فَلَمَّا أَلْقَوْا سَحَرُوا أَعْيُنَ النَّاسِ وَ اسْتَرْهَبُوهُمْ»
"He said, ‘Throw [yours].’ So when they threw, they bewitched the people’s eyes and overawed them, producing a tremendous magic." [Al-A’rāf: 166]
A saḥr which in reality takes place with cause and effect, like the example of separating a husband and wife:
«فَيَتَعَلَّمُونَ مِنْهُما ما يُفَرِّقُونَ بِهِ بَيْنَ الْمَرْءِ وَ زَوْجِهِ»
"... they would cause a split between man and his wife..." [Al-Baqarah: 102]
Here, the saḥr is not just plain trickery but it actually took place and had an impact on reality, which in this case was the separation of the husband and wife.
Whatever the origin of saḥr may be, it is a mere instrument. If used for deception and ill purpose, it is impermissible. However, if used to nullify and omit the saḥr of others, it is permissible. And therefore, if a group of people who meet the above mentioned conditions, it may become necessary to teach them this art. 
Teaching in order to omit Saḥr was the motive of Hārūt and Mārūt
Taking the above mentioned conditions and the verses of the Qur’an into consideration, we find that there lies no conflict between teaching saḥr and possessing infallibility. Furthermore, during the era of Prophet Sulaymān, whilst he was accompanied by Jinn and the winds were in his possession. The shayātīn (devils) noticed this to be an effect of saḥr, which gave him such influence and authority. They did not see this affect to be due to his prophet hood or close relation with Allah. The following verse discusses this:
«و َمَا كَفَرَ سُلَيمَانُ وَلَكِنَّ الشَّياطِينَ كَفَرُوا »
... and Solomon did not turn faithless, but it was the devils who were faithless..." [Al-Baqarah: 102]
The verse also explains how the Shayāṭīn due to this opinion [of the prophet] turned faithless and although Prophet Sulaymān actually made use of saḥr, he was not turned away from faith. The shayātīn, with this invalid assumption, resorted to using saḥr to misguide others. In retaliation to there actions, Allah sent down these two angels to teach the people the necessary saḥr to protect themselves. And whilst training the people in the use of saḥr, Hārūt and Mārūt would constantly give them warnings:
«وَ مَا يُعَلِّمَانِ مِنْ أَحَدٍ حَتىَ يَقُولَا إِنَّمَا نحَْنُ فِتْنَةٌ فَلَا تَكْفُر»
and they would not teach anyone without telling [him], ‘We are only a test, so do not be faithless.’ [Al-Baqarah: 102]
They, time after time, stressed on these two points: Firstly, that this teaching is a test for you, therefore use it correctly. And secondly, do not become faithless by misusing this saḥr, which was sent to you in your favor and for your protection. Furthermore, the verse goes on to describe the defeat of the Jews in such a way:
«فَيَتَعَلَّمُونَ مِنْهُمَا مَا يُفَرِّقُونَ بِهِ بَينَْ الْمَرْءِ وَ زَوْجِه ... وَ يَتَعَلَّمُونَ مَا يَضُرُّهُمْ وَ لَا يَنفَعُهُم»
"But they would learn from those two that with which they would cause a split between man and his wife... And they would learn that which would harm them and bring them no benefit..." [Al-Baqarah: 102]
the verse emphasizes that the Jews took advantage of the grace of Allah, chose the path of deviation and became occupied in causing division between husband and wife. 
To fully understand how magic, whose act is clearly prohibited, can still be deemed permissible under certain conditions, we can use the following example of lying. It is well known and agreed upon that lying is considered an incorrect and inferior act. However, this same act under certain circumstances may become acceptable and at other times even necessary. The example given is where one is in a situation that if he told the truth, an innocent person would be killed and in this case lying would mean saving his life. For instance, in a scenario where an oppressor is searching for an individual to unjustly apprehend him and sentence him death. In such a case, withholding the information regarding his whereabouts and even lying becomes necessary.
The forbiddance of saḥr is similar to the above mentioned example. In simple words, if used for ill intentions, magic is forbidden. But, if used to good purposes on the path of Allah, then it is permissible, similar to the example of lying for a good purpose. Therefore, just as lying for a foreseen good purpose was admissible; using magic for the same purpose is also admissible. Teaching saḥr is therefore also permissible, if the purpose is the same.
- Muḥammad ibn ‘Alī ibn Bābūyah, ‘Uyūn akhbār Al-Riḍā ‘alayhi al-salām, Volume 1 (Tehran: Nashar Jahān, 1958) 271
- Khalīl ibn Aḥmad Farahīdī, Al-‘Ayn, volume 3 (Qom: Nashar Hijrat, 1989) 135
- Nāṣir Makārim Shīrazī, Tafsīr Nimūneh, Volume 1, (Tehran: Dārul-Kitāb Al-Islāmīyah, 1995) 377- 378
- Faḍal ibn Ḥasan Ṭabarasī, Tafsīr Jawāmi’ Al- Jāmi’ (Qom: Intishārāt dānishgāh Tehrān wa mudīrīyat ḥawzah ‘ilmiyyah Qom, 1998) verse 102