Adoni-zedek, king of Jerusalem, hears that Gibeon has made peace with Israel and is filled with fear, because Gibeon is a great city, like one of the royal cities. He summons the kings of Hebron, Jarmuth, Lachish and Eglon, and the five go up to attack Gibeon. The Gibeonites send to Joshua at Gilgal for help, and he goes up with his whole army. The Lord tells him not to fear, for he has given them into his hand.
Joshua marches all night and surprises them. The Lord throws them into a panic before Israel, and Israel pursues them toward Azekah and Makkedah. As they flee, the Lord hurls great stones from heaven, and more die from the hailstones than by the sword of Israel. Then Joshua speaks to the Lord in the presence of Israel and commands the sun to stand still over Gibeon and the moon over the Valley of Aijalon. The sun and moon stop until the people take vengeance on their enemies, as written in the Book of Jashar. There has been no day like it, before or since, when the Lord heeded the voice of a man, for the Lord fought for Israel.
The five kings flee and hide in a cave at Makkedah. Joshua orders it sealed with large stones and the pursuit to continue. Later they bring the kings out, and Joshua tells the commanders to put their feet on the necks of the kings and says they should not fear, for the Lord will do the same to all their enemies. The kings are put to death, hanged until evening and placed in the cave. Then Israel takes Makkedah, Libnah, Lachish (with Horam, king of Gezer, defeated when he came to help), Eglon, Hebron and Debir. The summary notes that Joshua conquered the hill country, the Negeb, the lowland and the slopes, from Kadesh-barnea to Gaza and from Goshen to Gibeon, because the Lord fought for Israel. Joshua returns to Gilgal.