1 Now it came about when Adoni-zedek king of Jerusalem heard that Joshua had captured Ai, and had utterly destroyed it (just as he had done to Jericho and its king, so he had done to Ai and its king), and that the inhabitants of Gibeon had made peace with Israel and were within their land, 2 that he feared greatly, because Gibeon was a great city, like one of the royal cities, and because it was greater than Ai, and all its men were mighty. 3 Therefore Adoni-zedek king of Jerusalem sent word to Hoham king of Hebron and to Piram king of Jarmuth and to Japhia king of Lachish and to Debir king of Eglon, saying, 4 "Come up to me and help me, and let us attack Gibeon, for it has made peace with Joshua and with the sons of Israel." 5 So the five kings of the Amorites, the king of Jerusalem, the king of Hebron, the king of Jarmuth, the king of Lachish, and the king of Eglon, gathered together and went up, they with all their armies, and camped by Gibeon and fought against it.
6 Then the men of Gibeon sent word to Joshua to the camp at Gilgal, saying, "Do not abandon your servants; come up to us quickly and save us and help us, for all the kings of the Amorites that live in the hill country have assembled against us." 7 So Joshua went up from Gilgal, he and all the people of war with him and all the valiant warriors. 8 The LORD said to Joshua, "Do not fear them, for I have given them into your hands; not one of them shall stand before you." 9 So Joshua came upon them suddenly by marching all night from Gilgal. 10 And the LORD confounded them before Israel, and He slew them with a great slaughter at Gibeon, and pursued them by the way of the ascent of Beth-horon and struck them as far as Azekah and Makkedah. 11 As they fled from before Israel, while they were at the descent of Beth-horon, the LORD threw large stones from heaven on them as far as Azekah, and they died; there were more who died from the hailstones than those whom the sons of Israel killed with the sword.
12 Then Joshua spoke to the LORD in the day when the LORD delivered up the Amorites before the sons of Israel, and he said in the sight of Israel, "O sun, stand still at Gibeon, And O moon in the valley of Aijalon."
13 So the sun stood still, and the moon stopped, Until the nation avenged themselves of their enemies Is it not written in the book of Jashar? And the sun stopped in the middle of the sky and did not hasten to go down for about a whole day. 14 There was no day like that before it or after it, when the LORD listened to the voice of a man; for the LORD fought for Israel.
15 Then Joshua and all Israel with him returned to the camp to Gilgal.