After the initial defeat at Ai, it makes sense that Joshua (and presumably his troops) are scared about trying again. However, this time, God assures him that things will be different. “And the Lord said to Joshua, Fear not, and be not dismayed; take all the people of war with you and arise, go up to Ai. See, I have given into your hand the king of Ai, and his people, and his city, and his land (Joshua 8:1).” Unlike in Jericho, where the victory was explicitly God’s, this time, the people are rewarded for their efforts. They are allowed to take the spoils of war after the ambush and subsequent victory. This is the exact opposite of the previous battle, which is exactly what the people were just punished for. Maybe this is meant to be a placating gesture, to revamp the morale of the Israelites.
Joshua lays out the battle plan for the people. He’s clearly a very hands on leader, and uses his military skills as well as his prophetic gifts in his leadership. “And Joshua sent them; and they went to the place of ambush, and stayed between Beth-el and Ai, on the west side of Ai; and Joshua lodged that night among the people (Joshua 8:9).” In Joshua’s willingness to be among the people and to count himself as one of them, rather than holding himself apart, I see elements of modern leadership qualities. In the Israeli army, for example, officers gain the respect of their troops by toughing it out with them, going into battle and suffering, rather than waiting on the sidelines. Joshua is in the thick of the action, doing exactly what he asks of his men, and I believe that this probably made them respect and appreciate him more than if he had stayed a ceremonial figurehead.
The ambush occurs at dawn. The Israelites trick the people of Ai by pretending to run away in defeat, but once they’re pursued, they turn around and capture the city before slaughtering the people. It’s a total victory, culminating with the hanging of the king. Again, a harsh victory, almost barbaric by modern standards. But in biblical times, it made total sense that defeating an enemy meant wiping them out. After the battle, Joshua built a new altar to God on Mount Ebal. “And he wrote there upon the stones a copy of the law of Moses, which he wrote in the presence of the children of Israel (Joshua 8:32).” In this act, at the moment of victory, the people are reminded of their past. Even though this achievement is theirs, they are connected to God in this moment, and are reminded of the inextricable link between the two.