The final story in Surah Al Kahf is in relation to Dhul-Qarnayn. This story, including the story of the People of the Cave, was revealed in response to the efforts by the Jews of Mecca to discredit Rasulullah SAW. Their scholars had knowledge of certain tales only known to the religious elite amongst them, and they challenged Rasulullah SAW by giving him certain key words and asking him to describe these stories in full to prove that he was indeed a Prophet. Not having Jewish or Christian ancestry, these stories were not known to the community of Mekkah at that time and were not part of their traditions. So, the only means of which Rasulullah SAW could have told them the details was if the story was revealed by Allah himself (through the angel Jibril AS).
When asked to describe these incidents, Rasulullah SAW asked the questioners to return the following day, and that he would answer their questions then – but he omitted from saying “Insha Allah” (God willing). This was a tiny mistake on his part, but Allah swiftly admonished him for this oversight. Usually when challenged by the disbeliever, or if faced with an issue that would require divine guidance to solve, Jibril AS would reveal the revelations to Muhammad SAW and the answer to challenges were provided quickly: if not the same day itself, then within a short period of time after that. In this case, however, day after day passed and as time went by, Jibril AS did not materialize. As time passed, people speculated that Rasulullah SAW did not rise up to the challenge thrown by the Jews. This was a trial from Allah, and also for admonishing Rasulullah SAW for not saying “Insha Allah” before making a commitment.
This reminder is in fact recorded in the Qur'an:
And never say of anything, "Indeed, I will do that tomorrow," Except [when adding], "If Allah wills." And remember your Lord when you forget [it] and say, "Perhaps my Lord will guide me to what is nearer than this to right conduct." (Al Qur'an; 18:24)
Who was Dhul-Qarnayn?
Eventually however, Allah revealed the answers to Rasulullah SAW, and they are contained in the eighteenth chapter of the Qur'an, Surah Al Kahf.
And they ask you, [O Muhammad], about Dhul-Qarnayn. Say, "I will recite to you about him a report." (Al Qur'an 18:83)
Who exactly is Dhul-Qarnayn? It is popularly believed that Dhul-Qarnayn refers to Iskandar Dhul-Qarnayn or Alexander the Great of Macedonia. However, the historical details do not match, and further, Alexander the Great of Macedonia was not a believer in Islam whereas Dhul-Qarnayn was a pious believer. There are many theories of who this man was and in what era he lived. However, the precise identity of Dhul-Qarnayn is not described in the Qur'an and Hadith, and Allah did not provide us with the details for a wisdom that He knows. As with many other Qur’anic stories, Allah only reveals essential information to us, and if details are not revealed, then the knowledge of such details is inconsequential to our journey of iman and we should not enquire or debate any further about it.
What is known is that Dhul-Qarnayn was a man endowed by Allah with many talents and abilities, including military prowess, the ability to rule kingdoms, and extensive practical knowledge on many aspects of life. He was also a pious and steadfast Muslim who constantly contemplated over the signs of Allah and lived his days travelling from one destination to the next in order to establish justice in the land and alleviate the suffering of the people.
Indeed We established him upon the earth, and We gave him to everything a way. So he followed a way. (Al Qur’an 18:84 - 18:85)
The Travels of Dhul-Qarnayn
Dhul-Qarnayn travelled extensively in his life. It is said that he ruled the earth from east to west, but it is noted that Allah only revealed part of this story to us. We therefore record what is revealed in the Qu’ran, and will not cite information which is not verified by authentic sources.
One of this travels brought him to the West, where he found the sun setting as if in a spring of dark mud. In this location he discovered a community who were living under oppressed conditions.
Until, when he reached the setting of the sun, he found it [as if] setting in a spring of dark mud, and he found near it a people. Allah said, "O Dhul-Qarnayn, either you punish [them] or else adopt among them [a way of] goodness." (Al Qur'an 18:86)
So Dhul-Qarnayn went into the community and led them to the correct path and ways of life in accordance with the rulings of the Almighty. He liberated the community from the oppression that they were subject to, inflicted punishment upon the oppressors, criminals and evildoers and aided the weak and oppressed until justice was established in the land.
He said, "As for one who wrongs, we will punish him. Then he will be returned to his Lord, and He will punish him with a terrible punishment. But as for one who believes and does righteousness, he will have a reward of Paradise, and we will speak to him from our command with ease." (Al Qur'an 18:87 – 18:88)
Having completed his task, he and his army continued on their journey, until one day, against the rising sun, he found a people who were backward and ignorant, living in the open without any shelter or protection against the sun.
Then he followed a way. Until, when he came to the rising of the sun, he found it rising on a people for whom We had not made against it any shield. (Al Qur'an 18:90)
He educated the community there on what they needed to do. He shared and imparted his knowledge to them, taught them the skills required such as carpentry and agriculture, and then continued on his journey.
Thus. And We had encompassed [all] that he had in knowledge. (Al Qur'an 18:91)
The next part of his journey is the most astounding, where he met a curious community, so far removed that he barely understood their language.
Then he followed a way. Until, when he reached [a pass] between two mountains, he found beside them a people who could hardly understand [his] speech. (Al Qur'an 18:92 - 18:93)
They said, "O Dhul-Qarnayn, indeed (Ya'juj) Gog and Magog (Ma'juj) are [great] corrupters in the land. So may we assign for you an expenditure that you might make between us and them a barrier?" (Al Qur'an 18:94)