Chapter seven records what happened when an Israelite disobeyed the Lord and kept some of Jericho’s spoils for himself. The next city on their itinerary was Ai and their spies reported that because it was such an insignificant place only a few thousand troops would be needed. However, the army was routed and fled in terror. Joshua inquired of the Lord and learned of the sin. Then the people were called out and the guilty party was narrowed down to Achan a member of Zerah’s family of the tribe of Judah. He confessed to his sin and the punishment was meted out by the whole nation.
Joshua then led the army against Ai and using a military strategy of ambush and shock they defeated the city and destroyed both the people and their dwellings. The Lord allowed the people to keep the spoils of battled on this occasion. The covenant was then renewed on Mt. Ebal with the reading of the blessings and curses again.
Chapter nine records the deception of the Gibeonites. They pretended to be from far away so that the Israelites would make a treaty with them. When the Israelites found out they actually lived quite near they were furious with their leaders for making the treaty but Joshua allowed them to live in the land as “woodcutters and water carriers for the community and for the altar of the Lord” (9:27). The Gibeonites never caused trouble for Israel like the other nations and God even punished Israel on account of Saul’s sin in killing them (2 Sam 21:1). They were a tribe which seemed to genuinely turn to Israel’s God.