Surah Kahf mentions the story of Ashaabi Kahf, the People of the Cave who, though unknown to each other, banded together on the basis of their beliefs and sought refuge in a cave to safeguard their Imaan.

They once happened to join the masses during a celebration and noticed that the people prostrated to idols and revered them deeply. Allah opened their hearts and guided them to realise that this practice was incorrect. They then decided to leave the people because they would not be allowed to adhere to their belief in the Oneness of Allah (Tawheed).

This thought crossed the minds of those few young men simultaneously and they started moving away from there to avoid the absurd practice of their people in the fair name of worship. The first young man who withdrew went far from the crowd and sat down under a tree. After that, came another and he too sat there. Similarly, came the third, and the fourth, and each one of them kept taking a seat under the tree. But, none of them were familiar with each other, nor did they know as to why they had come there. The truth of the matter is that they were brought together on that spot by the Power that lit the light of faith in
their hearts.

Everyone was concealing his belief from the other lest this person reports him to the king and he gets arrested. After having remained there all together in silence, one of them spoke out, “Brothers, there must be some reason why all of us have broken away from our people and reached here. It seems appropriate that we all should get to know each other’s thoughts.”

Thereupon, one person declared, “The truth is that the faith and worship in which I found my people involved gave me the certitude that this whole thing is false. ‘Ibaadah or worship should be for One Allah who is most exalted in His majesty and who has no partner or associate in the act of the creation of this universe.” This broke the ice. Others were prompted to speak out and they all declared that this was the thought, the belief that separated them from their people and brought them there.

Now they were an ideologically unified group enjoying mutual fellow-ship and friendship. They set up a separate House of Worship for themselves where they would assemble and worship Allah ta’ala Who is One and Who has no partner in His divinity.

But, soon they became the talk of the town. Backbiters told on them before the king who ordered that they all should be brought to him. When they came into the royal court, the king asked them about their beliefs. Allah ta’ala gave them the courage to state their belief in the Oneness of Allah. In fact, they invited the king himself to believe as they did. This is precisely what has been mentioned in the verses 14 and 15.

When these young men acted bold before the king and invited him to believe, he turned the call down and threatened them with drastic action. He had the princely robes they donned on their bodies taken off in
reprisal so that they may think and change their behavior. In order that they actually do so, he gave them respite for a few days saying that they were young, therefore, he did not wish to kill them right away. In fact, he wanted them to have the time to think over it. Then, if they reverted to the faith of their people, they will be allowed to live as usual, otherwise they would be killed.

It must have been the mercy of Allah ta’ala on His believing servants that this respite given to them opened an escape door for them. They ran from there and took refuge in a cave.