Therefore the five kings of the Amorites, the king of Jerusalem, the king of Hebron, the king of Jarmuth, the king of Lachish, the king of Eglon, gathered themselves together, and went up, they and all their hosts, and encamped before Gibeon, and made war against it.
And the men of Gibeon sent unto Joshua to the camp to Gilgal, saying, Slack not thy hand from thy servants; come up to us quickly, and save us and help us: for all the kings of the Amorites that dwell in the mountains are gathered together against us.
So Joshua ascended from Gilgal, he, and all the people of war with him, and all the mighty men of valor. And the Lord said unto Joshua, Fear them not: for I have delivered them into thine hand; there shall not a man of them stand before thee. Joshua therefore came unto them suddenly, and went up from Gilgal all night. And the Lord discomfited them before Israel, and slew them with a great slaughter at Gibeon, and chased them along the way that goeth up to Beth-horon, and smote them to Azekah, and unto Makkedah. And it came to pass, as they fled from before Israel, and were in the going down to Beth-horon, that the Lord cast down great stones from heaven upon them unto Azekah, and they died: they were more which died with hailstones than they whom the children of Israel slew with the sword.
Then spake Joshua to the Lord in the day when the Lord delivered up the Amorites before the children of Israel, and he said in the sight of Israel, Sun, stand thou still upon Gibeon; and thou, Moon, in the valley of Ajalon. And the sun stood still, and the moon stayed, until the people had avenged themselves upon their enemies. Is not this written in the book of Jasher? So the sun stood still in the midst of heaven, and hastened not to go down about a whole day. And there was no day like that before it or after it, that the Lord hearkened unto the voice of a man: for the Lord fought for Israel.
And Joshua returned, and all Israel with him, unto the camp to Gilgal. But these five kings fled, and hid themselves in a cave at Makkedah. And it was told Joshua, saying, The five kings are found hid in a cave at Makkedah. And Joshua said, Roll great stones upon the mouth of the cave, and set men by it for to keep them: and stay ye not, but pursue after your enemies, and smite the hindmost of them; suffer them not to enter into their cities; for the Lord your God hath delivered them into your hand.
And it came to pass, when Joshua and the children of Israel had made an end of slaying them with a very great slaughter, till they were consumed, that the rest which remained of them entered into fenced cities. Joshua x, 5-20.