Once Hazrat Musa a.s asked Allah, “Is there anyone more knowledgeable than me?” To Hazrat Musa a.s’ surprise, Allah said, “Yes!”
Hazrat Musa a.s inquired about the person and came to know that his name is ‘Khazir’. Hazrat Musa a.s asked Allah to let Hazrat Khazir be his teacher so that he (Hazrat Musa a.s) might gain some knowledge. Allah permitted him, and told him to take a fried fish along with him and travel by a boat to some place. The place where this fish would comeback to life, would be the place where Hazrat Khazir can be found.
So as it happened, Hazrat Musa a.s setout in a boat along with a subordinate. After travelling for a while Hazrat Musa a.s asked his subordinate to remind him the place where this fish would resurrect. Hazrat Musa a.s felt asleep and after moving for a day or so, they reached a place where this fish jumped into the water. This subordinate had decided to let Hazrat Musa a.s know but seeing him in a state of rest, he thought to tell it afterwards.
After travelling further, they reached to some place and decided to anchor the boat. Hazrat Musa a.s got off the boat and started to explore the place. Both of them were hungry and decided to eat the fish they were carrying, soon it dawned upon them that the fish was meant to be a compass rather than the food.
So, Hazrat Musa a.s asked his subordinate to bring that fish.
Subordinate: “Master, the fish got resurrected and went into the water.”
Hazrat Musa a.s: “Then, why didn’t you inform me?”
Sub: “I decided to inform you after you had rested but Shaitan made me forget.”
Irked by such response, Hazrat Musa a.s decided to traceback their footsteps to the place his subordinate mentioned. They decided to move along the shore as mentioned by the subordinate. After traveling for some more distance on foot, they saw a man sleeping under a tree.
Both of them were hungry and tired, and hoped to get some food from this man. At this point, the subordinate recollected that this is the same place where the fish had resurrected. He soon informed Hazrat Musa a.s who now approached this man and said, “Asalamualaikum”
Hazrat Khazir with his arm over his face replied, “What do you want?!”
Hazrat Musa a.s expected to hear more soft and peaceful words in return but since this man was to be his teacher he explained his visit.
Hazrat Khazir, in a harsh tone, replied, “Yes, I know who you’re and what business you’ve here but why are you late?”
Despite being a short tempered person, hungry for whole day while traveling, and the prophet of his time; Hazrat Musa a.s asked for forgiveness from his teacher and “Fan’talaqaa” (Both of them decided to move forward).
Rest is mentioned in Quran, Surah Kahf.