Joshua sent some men from Jericho to spy out the city of Ai.
They returned with the positive report, they told Joshua,
"It's a small town, we don't need to send all of our men to fight,
Let's just send 2-3 thousand men to fight for us."
So Joshua sent 3 thousand men to fight,
but they were defeated.
Joshua and all Israelites repented before God.
Then God was no longer angry with them.
God told Joshua,
"Do not be afraid, attack Ai again for I will give them to you."
Joshua destroyed the city of Ai.
Joshua and Israelites army also defeated
Southern kings and Northern kings,
and their cities.
In total, 31 kings and their cities were destroyed.