having no need of him because of what Allah had taught him.
No one whom Islam has reached may say to Muhammad, “I possess knowledge from Allah which He has taught me and which you do not know.” Whoever permits this, or believes that any person—whether an ascetic, a devoted worshipper, or anyone else—may exempt himself from Muhammad’s call and from following him—may Allah bless him and grant him peace—is a disbeliever by the consensus of the Muslims. The evidence for this in the Quran and Sunnah is too abundant to recount here.
The story of al-Khidr involves no departure from the revealed law. Thus, when al-Khidr explained to Moses his reasons for doing what he had done, Moses agreed with him, and they no longer differed. Had al-Khidr’s actions contravened the law revealed to Moses, Moses would not have agreed with him. Similar situations occur among believers: one of two people may know of a circumstance that makes an action permissible under the revealed law, while the other is unaware of that circumstance, even though he may be superior to the first.
For example, two people enter someone’s house. One knows that the owner willingly allows him to make use of his home, whether through verbal permission or otherwise, and so he does so. This is permissible under the revealed law. The other, unaware of this permission, refrains.
Making a hole in the boat was a case of this kind. Al-Khidr knew that ahead of them was a king who seized every boat by force. It was in the boat owners’ interest, and what they would have chosen had they known this, to prevent him from seizing it . . . (1) better than having it taken from them.