God told Joshua at the start of overtaking the Promised Land to be strong and courageous, neither be afraid or dismayed because He, Himself, would win their battles. God went before the Israelites and struck the hearts of all with fear. God’s hand of favor was on Israel as they fought battles. And God was also their rearguard after each battle was won. All the battles were bloody and messy. It was human to human. The soldiers would look into the eyes of the lands inhabitants and according to God’s command they would kill men, women and children.
After a significant victory in which five kings were captured, Joshua repeated God’s promise to his army of being strong and courageous and letting God Himself fight the battles. Then Joshua took the five kings, killed them and after that impalled them on sharpened poles for everyone to see until the day ended.
Joshua 10 ~
20 So Joshua and the Israelite army continued the slaughter and completely crushed the enemy. They totally wiped out the five armies except for a tiny remnant that managed to reach their fortified towns. 21 Then the Israelites returned safely to Joshua in the camp at Makkedah. After that, no one dared to speak even a word against Israel.
22 Then Joshua said, “Remove the rocks covering the opening of the cave, and bring the five kings to me.” 23 So they brought the five kings out of the cave—the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon. 24 When they brought them out, Joshua told the commanders of his army, “Come and put your feet on the kings’ necks.” And they did as they were told.
25 “Don’t ever be afraid or discouraged,” Joshua told his men. “Be strong and courageous, for the Lord is going to do this to all of your enemies.”26 Then Joshua killed each of the five kings and impaled them on five sharpened poles, where they hung until evening.
27 As the sun was going down, Joshua gave instructions for the bodies of the kings to be taken down from the poles and thrown into the cave where they had been hiding. Then they covered the opening of the cave with a pile of large rocks, which remains to this very day.