Chapter eight shows the result of Achan’s sin being discovered and punished. Rather than sending only 3,000 warriors (Joshua 7:4) to attack head-on, Joshua sent 30,000 warriors to set an ambush for Ai (Joshua 8:1-9). Joshua would take a contingent against Ai, then pretend as if he were retreating, like the previous time. Again the warriors of Ai would chase them down, celebrating their second victory over Jehovah (that Jericho could not accomplish), but the ambush command would capture their city behind them. The plan worked exactly as intended, because God was with them (Joshua 8:10-23). All of the people of Ai were killed, and the city was burnt to the ground.
There were a few instances during Moses’ time when God had Moses stand in a particular spot or do something during the course of an event to prove that God was actually the one fighting for the Israelites. One situation was in Exodus 17:8-16, when Joshua and the Israelites fought the Amalekites. During the battle, Moses was to keep his hands lifted high in the air. While they were lifted, Israel won; when they fell, Israel lost. Aaron and Hur ended up holding Moses’ arms for him, and the battle was finally won. In a similar case at Ai, God told Joshua to hold out his “curved sword” (Joshua 8:18), which he did “until Israel had annihilated all who lived in Ai” (Joshua 8:26), just as God had promised. The king of Ai was captured alive, and Joshua had him publicly hanged (Joshua 8:29).
The remainder of the chapter describes the fulfillment of Moses’ command to the people in Deuteronomy 11:26-32. When the people entered the land, they were to read the book of the Law, setting out both the blessings for obedience and the curses for disobedience on Mounts Gerizim and Ebal. After the victory at Ai, Joshua did what Moses had said (Joshua 8:30-35). They built the altar, offered the sacrifices, and read the whole law in the presence of all of the people. No one in the entire nation was ignorant of what God had said.