Yehoshua sent spies to scout out Ai, thinking it would be easy to defeat after their victory over Jericho. However, the Israelites were defeated in battle against Ai, losing 36 men. God told them this was because someone had secretly taken gold and other items from Jericho that were forbidden. Achan admitted to taking the gold and was executed for his actions. Yehoshua then came up with a new battle plan, sending part of his army to sneak around and attack Ai from the rear while drawing the army out, allowing them to capture and burn the now undefended city. The Israelites were victorious in conquering Ai.