Sura al-Kahf: Moses seeks al-Khadir
As stated in Sura 18 (al-Kahf) of the Holy Qur'ān:
And Moses said to his servant: "I will not cease from my wanderings until I have reached the place where the two seas meet, even though I journey for eighty years". But when they had reached the place where the two seas meet, they forgot their fish, and it took its way through a stream to the sea.
And when they had journeyed past this place, Moses said to his servant: "Bring us our breakfast, for we are weary from this journey".
But the other replied: "See what has befallen me! when we were resting there by the rock, I forgot the fish. Only Satan can have put it out of my mind, and in wondrous fashion it took its way to the sea".
Then Moses said: "That is the place we seek". And they went back the way they had come. And they found one of Our servants, whom we had endowed with Our grace and Our wisdom. Moses said to him" "Shall I follow you, that you may teach me for my guidance some of the wisdom you have learnt?"
But he answered: "You will not bear with me, for how should you bear patiently with things you cannot comprehend?
Moses said: "If Allah wills, you shall find me patient: I shall not in anything disobey you".
He said: "If you are bent on following me, you must ask no question about anything till I myself speak to you concerning it".
The two set forth, but as soon as they embarked, Moses companion bored a hole in the bottom of the ship.
"A strange thing you have done! exclaimed Moses, "Is it to drown her passengers that you have bored a hole in her?"
"Did I not tell you", he replied, "that your would not bear with me?"
"Pardon my forgetfulness", said Moses, "Do not be angry with me on this account".
They journeyed on until they fell in with a certain youth. Moses companion slew him, and Moses said: "You have killed an innocent man who has done no harm. Surely you have committed a wicked crime".
"Did I not tell you", he replied, "that you would not bear with me?"
Moses said: "If ever I question you again, abandon me; for then I should deserve it".
They travelled on until they came to a certain city. They asked the people for some food, but the people declined to receive them as their guests. There they found a well on the point of falling down. The other raised it up, and Moses said; "Had you wished, you could have demanded payment for your labours".
"Now the time has arrived when we must part", said the other, "But first I will explain to you those acts of mine which you could not bear with in patience.
Know that the ship belong to some poor fishermen. I damaged it because in their rear was a king who was taking every ship by force.
"As for the youth, his parents both are true believers, and we feared lest he should plague them with his wickedness and unbelief. It was our wish that their Lord should grant them another in his place, a son more righteous and more filial.
"As for the wall, it belonged to two orphan boys in the city whose father was an honest man. Beneath it their treasure is buried. Your Lord decreed in His mercy that they should dig out their treasure when they grew to manhood. What I did not done by caprice. That is the meaning of the things you could not bear with in patience ...
The person referred to as "One of our servants, whom We had endowed with Our grace and Our wisdom" is the figure of Khidr, "the Verdant One" who plays a pivotal role in Islamic mysticism.