Sahih al-Bukhari 7478
Abdullah bin Muhammad narrated to us that Abu Hafs Amr told us. Auza'i narrated to us that Ibn Shihab told me. Ibn Shihab narrated from Ubaidullah bin Abdullah bin Utbah bin Mas'ud, and Ubaidullah from Hazrat Ibn Abbas (ra), that he and Hazrat Hurr bin Qais bin Hisn Fazari (ra) were debating with one another about the companion of Moses (as), whether he was Khidr. Meanwhile Hazrat Ubayy bin Ka'b Ansari (ra) passed by them, and Hazrat Ibn Abbas (ra) called him and said: I and this companion of mine are debating about that companion of Moses (as) whom Moses (as) asked the way to meet. Did you hear the Messenger of Allah (saw) relate his story? He said: Yes. I heard the Messenger of Allah (saw) say: “While Moses (as) was in a gathering of the Children of Israel, a man came to him and asked: ‘Do you know anyone who is more learned than you?’ Moses (as) said: ‘No.’ Upon this it was revealed to Moses (as): ‘No; rather, Our servant Khidr (is more learned).’ Moses (as) asked the way to meet him, and Allah appointed the fish as a sign for him, and he was told: ‘When you lose the fish, then go back, for you will meet him.’ Moses (as) kept following the trail of the fish, which was in the sea. The young man of Moses (as) said to Moses (as): ‘When we rested by the rock, I forgot the fish by that rock. It was only Satan who made me forget to remember it.’ Moses (as) said: ‘That is just what we were seeking.’ Upon this the two of them went back, retracing their footsteps, and they found Khidr. Then their story is as Allah has related it.”
AI-translated by Islam-Today