Tafsir Ibn Kathir -> Surah Al-Kahf -> Was Al-Khidr a Prophet

﴿رَحْمَةً مِّن رَّبِّكَ وَمَا فَعَلْتُهُ عَنْ أَمْرِى﴾

(as a mercy from your Lord. And I did them not of my own accord.) Meaning, `These three things that I did, come from the mercy of Allah for those we have mentioned, the crew of the ship, the parents of the boy and the two sons of the righteous man; I was only commanded to do these things that were enjoined upon me.' This is proof and evidence in support of those who say that Al-Khidr, peace be upon him, was a Prophet, along with the Ayah which we have already quoted:

﴿فَوَجَدَا عَبْدًا مِّنْ عِبَادِنَآ ءَاتَيْنَاهُ رَحْمَةً مِّنْ عِندِنَا وَعَلَّمْنَاهُ مِن لَّدُنَّا عِلْمًا ﴾

(Then they found one of Our servants, on whom We had bestowed mercy from Us, and whom We had taught knowledge from Us.) ﴿18:65﴾