This topic has been covered in several tafsir and commentary, but I will quote from the following two sources:
- Al-Qurtubi in his tafsir (الجامع لأحكام القرآن)
- Ibn Qayyim al-Jawziyya in his book Bada'i' Al-Fawa-id (بدائع الفوائد)
In summary, this is the proper etiquette that we should all follow when attributing good and evil.
Evil is part of what Allah created as can be seen from Qur'an 4:78:
أَيْنَمَا تَكُونُوا يُدْرِكْكُمُ الْمَوْتُ وَلَوْ كُنْتُمْ فِي بُرُوجٍ
مُشَيَّدَةٍ وَإِنْ تُصِبْهُمْ حَسَنَةٌ يَقُولُوا هَذِهِ مِنْ عِنْدِ
اللَّهِ وَإِنْ تُصِبْهُمْ سَيِّئَةٌ يَقُولُوا هَذِهِ مِنْ عِنْدِكَ
قُلْ كُلٌّ مِنْ عِنْدِ اللَّهِ فَمَالِ هَؤُلَاءِ الْقَوْمِ لَا
يَكَادُونَ يَفْقَهُونَ حَدِيثًا
Wherever you may be, death will overtake you, even if you should be
within towers of lofty construction. But if good comes to them, they
say, "This is from Allah "; and if evil befalls them, they say, "This
is from you." Say, "All [things] are from Allah ." So what is [the
matter] with those people that they can hardly understand any
But the verse right after (Qur'an 4:79) explains that evil is a result of our actions:
مَا أَصَابَكَ مِنْ حَسَنَةٍ فَمِنَ اللَّهِ وَمَا أَصَابَكَ مِنْ
سَيِّئَةٍ فَمِنْ نَفْسِكَ وَأَرْسَلْنَاكَ لِلنَّاسِ رَسُولًا وَكَفَى
What comes to you of good is from Allah , but what comes to you of
evil, [O man], is from yourself. And We have sent you, [O Muhammad],
to the people as a messenger, and sufficient is Allah as Witness.
In the Arabic language, the phrase
فَمِنْ نَفْسِكَ uses
من as what is referred to as
al-sababiyya (السببية) or causality. Allah is telling us that evil is created by Allah, but we are the ones who inflict it upon ourselves or others, either directly or indirectly. Accordingly, as a form of proper etiquette in speech:
- ِAttribute good to Allah alone
- Attribute evil to ourselves, or omit attribution altogether.
In Qur'an 18:79, the act of destruction is attributed to Al-Khidr fully and directly. In Qur'an 18:81, the act of substitution is attributed to Allah fully and directly. In Qur'an 18:80, Al-Qurtubi said that the reason for the plural form is that there were two actions: the killing of the boy, and the substitution of the boy with another who is better. The attribution of the killing is to Khidr, and the attribution of the substitution is to Allah (my own translation, so treat with care):
وقال في الغلام فأردنا فكأنه أضاف القتل إلى نفسه والتبديل إلى الله
... and he said regarding the boy "we intended" as if he attributed
the murder to himself, and the substitution to Allah, may He be
Ibn Qayyim al-Jawziyya said in his book Bada'i' Al-Fawa-id (my own translation, so treat with care):
الطريقة المعهودة في القرآن الكريم هي أن أفعال الإحسان والرحمة والجود
تضاف إلى الله سبحانه وتعالى فيذكر فاعلها منسوبة إليه ولا يبني الفعل
معها للمفعول فإذا جيء بأفعال العدل والجزاء والعقوبة حذف وبني الفعل
معها للمفعول أدبا في الخطاب
The writing style used in the Holy Qur'an is that acts of charity,
mercy and generosity are attributed to Allah, may He be exalted, and
said acts would not be mentioned without attribution. Whereas, when it
comes to acts of justice, retribution, or punishment, the attribution
is omitted as a form of proper etiquette.
We do see a very good example of what Ibn Qayyim al-Jawziyya mentioned in Qur'an 1:7:
صِرَاطَ الَّذِينَ أَنْعَمْتَ عَلَيْهِمْ غَيْرِ الْمَغْضُوبِ عَلَيْهِمْ
The path of those upon whom You have bestowed favor, not of those who
have evoked [Your] anger or of those who are astray.
Ibn Al-Qayyim said (my own translation, so treat with care):
يعني أنه في الإنعام قال "أنعمت" وفي الغضب قال "المغضوب عليهم" ولم يقل
When it comes to favors, He said "whom You have bestowed favor", then
He said "those who have evoked [Your] anger" attributing it to the
people, rather than saying "those that You are angry with".
There are several other forms of the proper etiquette in addressing attributions. For instance, Prophet Ibrahim when addressing his people in Qur'an 26:80:
وَإِذَا مَرِضْتُ فَهُوَ يَشْفِينِ
And when I am ill, it is He who cures me.
Ibrahim does not attribute getting ill to Allah or to anyone or any cause, but attributes the cure to Allah. Similarly, in Qur'an 72:10:
وَأَنَّا لَا نَدْرِي أَشَرٌّ أُرِيدَ بِمَنْ فِي الْأَرْضِ أَمْ أَرَادَ
بِهِمْ رَبُّهُمْ رَشَدًا
And we do not know [therefore] whether evil is intended for those on
earth or whether their Lord intends for them a right course.
The Jinn in this verse omitted the attribution of evil ("whether evil is intended"), but attributed the good ("their Lord intends for them a right course") to Allah.
As for Qur'an 18:82:
رَحْمَةً مِنْ رَبِّكَ وَمَا فَعَلْتُهُ عَنْ أَمْرِي ذَلِكَ تَأْوِيلُ
مَا لَمْ تَسْطِعْ عَلَيْهِ صَبْرًا
... as a mercy from your Lord. And I did it not of my own accord. That
is the interpretation of that about which you could not have patience.
In his tafsir, Ibn-Kathir said (my own translation, so treat with care):
وقوله "رَحْمَةً مِنْ رَبِّكَ وَمَا فَعَلْتُهُ عَنْ أَمْرِي" أي هذا
الذي فعلته في هذه الأحوال الثلاثة إنما هو من رحمة الله بمن ذكرنا
... and his verse "as a mercy from your Lord. And I did it not of my
own accord" is referring to the three incidents ...
Ibn-Kathir said that in all three stories mentioned, Al-Khidr did not do any of the actions on his own accord, but it was a revelation or order from Allah, and that in all three stories, the actions were merciful.