When the Qur’an tells us the stories of the preceding generations; it aims at teaching us a lesson to apply to our lives. It stresses in many places that it is not our business to know the exact identities of the people who are mentioned in the stories; rather, we should know how they acted and how we should act. The Qur’an tells us about the people of the cave only that they were a group of young people who believed in Allah and fled from an oppressor. It does not concern us how many there were. All we should think about is that they are a good example for all people. All in all, we should focus on the lesson, not the person.
Sheikh `Atiyyah Saqr, former Head of Al-Azhar Fatwa Committee, states that: “The Qur’an tells us about one of the servants of Allah who had a meeting with the Prophet Musa (Moses). The details of their conversation are told in Surat Al-Kahf. Almighty Allah says: “Then found they one of Our slaves, unto whom We had given mercy from Us, and had taught him knowledge from Our presence” (Al-Kahf: 65). We are also told in many authentic hadiths about this servant of Allah who met Musa. Al-Bukhari and At-Tirmidhi reported that the name of this righteous servant of Allah was Al-Khadir. Muslim scholars differ regarding this man, whether he was a prophet or just a walyy (righteous servant of Allah). Imam Al-Qushairy and many others hold the view that he was a walyy while some other scholars say that he was a prophet. This last view is also held by Imam An-Nawawi. However, we conclude that there is no decisive opinion that can be adopted in this regard or taken for granted.
What is proven from the Qur’an is that he was a servant of Allah to whom Allah granted knowledge and mercy. He may be a prophet and may be a righteous servant of Allah. His name, as proven through hadith, was Al-Khadir. There is no decisive text indicating whether he is alive or dead. It is not of a high importance for a Muslim to delve into the details of such questions. This is not an issue that affects our belief and we should concern ourselves with the lesson from the story rather than focusing on the personality itself and posing questions that yield us no benefit.”