Joshua Commands the Sun To Stand Still
1 King Adonizedek of Jerusalem heard that Joshua had captured and destroyed the town of Ai, and then killed its king as he had done at Jericho. He also learned that the Gibeonites had signed a peace treaty with Israel. 2 This frightened Adonizedek and his people. They knew that Gibeon was a large town, as big as the towns that had kings, and even bigger than the town of Ai had been. And all of the men of Gibeon were warriors. 3 So Adonizedek sent messages to the kings of four other towns: King Hoham of Hebron, King Piram of Jarmuth, King Japhia of Lachish, and King Debir of Eglon. The messages said, 4 “The Gibeonites have signed a peace treaty with Joshua and the Israelites. Come and help me attack Gibeon!”
5 When these five Amorite kings called their armies together and attacked Gibeon, 6 the Gibeonites sent a message to the Israelite camp at Gilgal: “Joshua, please come and rescue us! The Amorite kings from the hill country have joined together and are attacking us. We are your servants, so don't let us down. Please hurry!”
7 Joshua and his army, including his best warriors, left Gilgal. 8 “Joshua,” the Lord said, “don't be afraid of the Amorites. They will run away when you attack, and I will help you defeat them.”
9 Joshua marched all night from Gilgal to Gibeon and made a surprise attack on the Amorite camp. 10 The Lord made the enemy panic, and the Israelites started killing them right and left. They chased the Amorite troops up the road to Beth-Horon and kept on killing them, until they reached the towns of Azekah and Makkedah. 11 And while these troops were going down through Beth-Horon Pass, the Lord made huge hailstones fall on them all the way to Azekah. More of the enemy soldiers died from the hail than from the Israelite weapons.
12-13 The Lord was helping the Israelites defeat the Amorites that day. So about noon, Joshua prayed to the Lord loud enough for the Israelites to hear:

“Our Lord, make the sun stop
in the sky over Gibeon,
and the moon stand still
over Aijalon Valley.”
So the sun and the moon
stopped and stood still
until Israel defeated its enemies.

This poem can be found in The Book of Jashar. The sun stood still and didn't go down for about a whole day. 14 Never before and never since has the Lord done anything like that for someone who prayed. The Lord was really fighting for Israel.
15 After the battle, Joshua and the Israelites went back to their camp at Gilgal.
Joshua Kills the Five Enemy Kings
16 While the enemy soldiers were running from the Israelites, the five enemy kings ran away and hid in a cave near Makkedah. 17 Joshua's soldiers told him, “The five kings have been found in a cave near Makkedah.”
18 Joshua answered, “Roll some big stones over the mouth of the cave and leave a few soldiers to guard it. 19 But you and everyone else must keep going after the enemy troops, because they will be safe if they reach their walled towns. Don't let them get away! The Lord our God is helping us get rid of them.” 20 So Joshua and the Israelites almost wiped out the enemy soldiers. Only a few safely reached their walled towns.
21 The Israelite army returned to their camp at Makkedah, where Joshua was waiting for them. No one around there dared say anything bad about the Israelites. 22 Joshua told his soldiers, “Now, move the rocks from the entrance to the cave and bring those five kings to me.”
23 The soldiers opened the entrance to the cave and brought out the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon. 24 After Joshua had called the army together, he forced the five kings to lie down on the ground. Then he called his officers forward and told them, “You fought these kings along with me, so put your feet on their necks.” The officers did this, 25 and Joshua continued, “Don't ever be afraid or discouraged. Be brave and strong. This is what the Lord will do to all your enemies.”
26 Joshua killed the five kings and told his men to hang each body on a tree. Then at sunset 27 he told some of his troops, “Take the bodies down and throw them into the cave where the kings were found. Cover the entrance to the cave with big rocks.”
Joshua's troops obeyed his orders, and those rocks are still there.
Joshua Continues the Fighting
28 Later that day, Joshua captured Makkedah and killed its king and everyone else in the town, just as he had done at Jericho.
29 Joshua and his army left Makkedah and attacked the town of Libnah. 30 The Lord let them capture the town and its king, and they killed the king and everyone else, just as they had done at Jericho.
31 Joshua then led his army to Lachish, and they set up camp around the town. They attacked, 32 and the next day the Lord let them capture the town. They killed everyone, as they had done at Libnah. 33 King Horam of Gezer arrived to help Lachish, but Joshua and his troops attacked and destroyed him and his army.
34 From Lachish, Joshua took his troops to Eglon, where they set up camp surrounding the town. They attacked, 35 captured it that same day, then killed everyone, as they had done at Lachish.
36 Joshua and his army left Eglon and attacked Hebron. 37 They captured the town and the nearby villages, then killed everyone, including the king. They destroyed Hebron in the same way they had destroyed Eglon.
38 Joshua and the Israelite army turned and attacked Debir. 39 They captured the town, and its nearby villages. Then they destroyed Debir and killed its king, together with everyone else, just as they had done with Hebron and Libnah.
40 Joshua captured towns everywhere in the land: In the central hill country and the foothills to the west, in the Southern Desert and the region that slopes down toward the Dead Sea. Whenever he captured a town, he would kill the king and everyone else, as the Lord God of Israel had commanded. 41 Joshua wiped out towns from Kadesh-Barnea to Gaza, everywhere in the region of Goshen, and as far north as Gibeon. 42-43 The Lord fought on Israel's side, so Joshua and the Israelite army were able to capture these kings and take their land. They fought one battle after another, then they went back to their camp at Gilgal after capturing all that land.
1 Now when Adoni-zedek King of Ierusalem had heard how Ioshua had taken Ai and had destroyed it, (for as he had done to Iericho and to the King thereof, so he had done to Ai and to the King thereof) and howe the inhabitants of Gibeon had made peace with Israel, and were among them, 2 Then they feared exceedingly: for Gibeon was a great citie, as one of the royall cities: for it was greater then Ai, and all the men thereof were mightie. 3 Wherefore Adoni-zedek King of Ierusalem sent vnto Hoham King of Hebron, and vnto Piram King of Iarmuth, and vnto Iapia King of Lachish, and vnto Debir King of Eglon, saying, 4 Come vp vnto me, and helpe me, that we may smite Gibeon: for they haue made peace with Ioshua and with the children of Israel. 5 Therefore the fiue Kings of the Amorites, the King of Ierusalem, the King of Hebron, the King of Iarmuth, the King of Lachish, and the King of Eglon gathered themselues together, and went vp, they with all their hostes, and besieged Gibeon, and made warre against it. 6 And the men of Gibeon sent vnto Ioshua, euen to the hoste to Gilgal, saying, Withdrawe not thine hand from thy seruants: come vp to vs quickly, and saue vs, and helpe vs: for all the Kings of the Amorites which dwell in the mountaines, are gathered together against vs. 7 So Ioshua ascended from Gilgal, he, and all the people of warre with him, and all the men of might. 8 And the Lord sayd vnto Ioshua, Feare them not: for I haue giuen them into thine hand: none of them shall stand against thee. 9 Ioshua therefore came vnto them suddenly: for he went vp from Gilgal all the night. 10 And the Lord discomfited them before Israel, and slew them with a great slaughter at Gibeon, and chased them along the way that goeth vp to Beth-horon, and smote them to Azekah and to Makkedah. 11 And as they fled from before Israel, and were in the going downe to Beth-horon, the Lord cast downe great stones from heauen vpon them, vntill Azekah, and they dyed: they were more that dyed with the hailestones, then they whom the children of Israel slewe with the sword. 12 Then spake Ioshua to the Lord, in the day when the Lord gaue the Amorites before the children of Israel, and he sayd in the sight of Israel, Sunne, stay thou in Gibeon, and thou moone, in the valley of Aialon. 13 And the Sunne abode, and the moone stood still, vntill the people auenged themselues vpon their enemies: (Is not this written in the booke of Iasher?) so the Sunne abode in the middes of the heauen, and hasted not to goe downe for a whole day. 14 And there was no day like that before it, nor after it, that the Lord heard the voyce of a man: for the Lord fought for Israel. 15 After, Ioshua returned, and all Israel with him vnto the campe to Gilgal: 16 But the fiue Kings fled and were hid in a caue at Makkedah. 17 And it was tolde Ioshua, saying, The fiue Kings are found hid in a caue at Makkedah. 18 Then Ioshua said, Roule great stones vpon the mouth of the caue, and set men by it for to keepe them. 19 But stand ye not still: follow after your enemies, and smite all the hindmost, suffer them not to enter into their cities: for the Lord your God hath giuen them into your hand. 20 And when Ioshua and the children of Israel had made an ende of slaying them with an exceeding great slaughter till they were consumed, and the rest that remained of them were entred into walled cities, 21 Then all the people returned to the campe, to Ioshua at Makkedah in peace: no man mooued his tongue against the children of Israel. 22 After, Ioshua sayd, Open the mouth of the caue, and bring out these fiue Kings vnto me forth of the caue. 23 And they did so, and brought out those fiue Kings vnto him forth of the caue, euen the King of Ierusalem, the King of Hebron, ye King of Iarmuth, the King of Lachish, and the King of Eglon. 24 And when they had brought out those Kings vnto Ioshua, Ioshua called for all the men of Israel, and sayd vnto the chiefe of the men of warre, which went with him, Come neere, set your feete vpon the necks of these Kings: and they came neere and set their feete vpon their necks. 25 And Ioshua sayd vnto them, Feare not, nor be faint hearted, but be strong and of a good courage: for thus will the Lord doe to all your enemies, against whome ye fight. 26 So then Ioshua smote them, and slewe them, and hanged them on fiue trees, and they hanged still vpon the trees vntill the euening. 27 And at the going downe of the sunne, Ioshua gaue commandement, that they should take them downe off the trees, and cast them into the caue (wherein they had bene hid) and they layde great stones vpon the caues mouth, which remaine vntill this day. 28 And that same day Ioshua tooke Makkedah and smote it with the edge of the sword, and the King thereof destroyed he with them, and all the soules that were therein, he let none remaine: for hee did to the King of Makkedah as he had done vnto the King of Iericho. 29 Then Ioshua went from Makkedah, and all Israel with him vnto Libnah, and fought against Libnah. 30 And the Lord gaue it also and the King thereof into the hand of Israel: and he smote it with the edge of the sword, and all the soules that were therein: he let none remaine in it: for he did vnto the King thereof, as he had done vnto the King of Iericho. 31 And Ioshua departed from Libnah, and all Israel with him vnto Lachish, and besieged it, and assaulted it. 32 And the Lord gaue Lachish into the hand of Israel, which tooke it the second day, and smote it with the edge of the sword, and all the soules that were therein, according to all as he had done to Libnah. 33 Then Horam King of Gezer came vp to helpe Lachish: but Ioshua smote him and his people, vntill none of his remained. 34 And from Lachish Ioshua departed vnto Eglon, and all Israel with him, and they besieged it, and assaulted it, 35 And they tooke it the same day, and smote it with the edge of the sword, and all the soules that were therein he vtterly destroyed the same day, according to all that he had done to Lachish. 36 Then Ioshua went vp from Eglon, and all Israel with him vnto Hebron, and they fought against it. 37 And when they had taken it, they smote it with the edge of the sword, and the King thereof, and all the cities thereof, and all the soules that were therein: he left none remaining, according to all as he had done to Eglon: for he destroyed it vtterly, and all the soules that were therein. 38 So Ioshua returned, and all Israel with him to Debir, and fought against it. 39 And when he had taken it, and the King thereof, and all the citie thereof, they smote them with the edge of the sword, and vtterly destroyed all the soules that were therein, he let none remaine: as he did to Hebron, so he did to Debir, and to the King thereof, as he had also done to Libnah, and to the King thereof. 40 So Ioshua smote all the hill countreys, and the South countreys, and the valleys, and the hill sides, and all their Kings, and let none remaine, but vtterly destroyed euery soule, as the Lord God of Israel had commanded. 41 And Ioshua smote them from Kadesh-barnea euen vnto Azzah, and all the countrey of Goshen, euen vnto Gibeon. 42 And all these Kings, and their land did Ioshua take at one time, because the Lord God of Israel fought for Israel. 43 Afterward, Ioshua and all Israel with him returned vnto the campe in Gilgal.