Did you know that the People of the Cave and the Inscription were of Our wondrous signs?
When the youths took shelter in the cave, they said, “Our Lord, give us mercy from Yourself, and bless our affair with guidance.”
Then We sealed their ears in the cave for a number of years.
Then We awakened them to know which of the two groups could better calculate the length of their stay.
We relate to you their story in truth. They were youths who believed in their Lord, and We increased them in guidance.
And We strengthened their hearts, when they stood up and said, “Our Lord is the Lord of the heavens and the earth; we will not call on any god besides Him, for then we would have spoken an outrage.”
“These people, our people, have taken to themselves gods other than Him. Why do they not bring a clear proof concerning them? Who, then, does greater wrong than he who invents lies and attributes them to God?”
“Now that you have withdrawn from them, and from what they worship besides God, take shelter in the cave. And your Lord will unfold His mercy for you, and will set your affair towards ease.”
You would have seen the sun, when it rose, veering away from their cave towards the right, and when it sets, moving away from them to the left, as they lay in the midst of the cave. That was one of God’s wonders. He whom God guides is truly guided; but he whom He misguides, for him you will find no directing friend.
You would think them awake, although they were asleep. And We turned them over to the right, and to the left, with their dog stretching its paws across the threshold. Had you looked at them, you would have turned away from them in flight, and been filled with fear of them.
Even so, We awakened them, so that they may ask one another. A speaker among them said, “How long have you stayed?” They said, “We have stayed a day, or part of a day.” They said, “Your Lord knows best how long you have stayed.” “Send one of you to the city, with this money of yours, and let him see which food is most suitable, and let him bring you some provision thereof. And let him be gentle, and let no one become aware of you.”
“If they discover you, they will stone you, or force you back into their religion; then you will never be saved.”
So it was, that We caused them to be discovered, that they would know that the promise of God is true, and that of the Hour there is no doubt. As they were disputing their case among themselves, they said, “Build over them a building.” Their Lord knows best about them. Those who prevailed over their case said, “We will set up over them a place of worship.”
They will say, “Three, and their fourth being their dog.” And they will say, “Five, and their sixth being their dog,” guessing at the unknown. And they will say, “Seven, and their eighth being their dog.” Say, “My Lord knows best their number.” None knows them except a few. So do not argue concerning them except with an obvious argument, and do not consult any of them about them.
And they stayed in their cave for three hundred years, adding nine.
Say, “God knows best how long they stayed.” His is the mystery of the heavens and the earth. By Him you see and hear. They have no guardian apart from Him, and He shares His Sovereignty with no one.