You would have thought they were awake, though they lay asleep. We turned them over, to the right and the left, while their dog lay at the cave's entrance with legs outstretched. Had you looked down and seen them, you would have surely turned your back and fled in terror. 18 Likewise, We roused them in a miraculous way that they might question one another. One of them asked: "How long did you remain (in this state)?" The others said: "We remained so for a day or part of a day." Then they said: "Your Lord knows better how long we remained in this state. Now send one of you to the city with this coin of yours and let him see who has the best food, and let him buy some provisions from there. Let him be cautious and not inform anyone of our whereabouts. 19 for, behold, if they should come to know of you, they might stone you to death or force you back to their faith - in which case you would never attain to any good!" 20 And similarly, We caused them to be found that they [who found them] would know that the promise of Allah is truth and that of the Hour there is no doubt. [That was] when they disputed among themselves about their affair and [then] said, "Construct over them a structure. Their Lord is most knowing about them." Said those who prevailed in the matter, "We will surely take [for ourselves] over them a masjid." 21 (Some) will say: They were three, their dog the fourth, and (some) say: Five, their dog the sixth, guessing at random; and (some) say: Seven, and their dog the eighth. Say (O Muhammad): My Lord is Best Aware of their number. None knoweth them save a few. So contend not concerning them except with an outward contending, and ask not any of them to pronounce concerning them. 22