(And they said to each other:) "Now that you have withdrawn from them and what they worship beside God, it is better to take refuge in the cave. Your Lord may bestow of His mercy on you, and facilitate your affair."
You may well have seen when the sun came up it moved away to the right of the cave, and when it went down it turned away to the left, and they stayed in its open space. This was among the signs of God. Whoever is guided by God follows the right path; and whosoever goes astray will not find a guide to show him the way.
You may have thought that they were awake, yet they were asleep. We made them turn right and left, while their dog lay with his forelegs stretched across the threshold. If you had looked at them you would have surely turned away and fled with horror at the sight.
Even so We roused them that they may question one another. One of them asked: "How long have you stayed here?" They said: "A day or less than a day." "Your Lord knows best," they said, "how long you have stayed. So send one of you to the town with this money of yours to look for wholesome food and bring it for you; but he should be careful not to let your presence known.
If they come to know of you they will stone you to death, or force you to go back to their creed; then you will never succeed."