Joshua 8:18-22
8:18 The Lord told Joshua, “Hold out toward Ai the curved sword in your hand, for I am handing the city over to you.” So Joshua held out toward Ai the curved sword in his hand.
8:19 When he held out his hand, the men waiting in ambush rose up quickly from their place and attacked. They entered the city, captured it, and immediately set it on fire.
8:20 When the men of Ai turned around, they saw the smoke from the city ascending into the sky and were so shocked they were unable to flee in any direction. In the meantime the men who were retreating to the desert turned against their pursuers.
8:21 When Joshua and all Israel saw that the men in ambush had captured the city and that the city was going up in smoke, they turned around and struck down the men of Ai.
8:22 At the same time the men who had taken the city came out to fight, and the men of Ai were trapped in the middle. The Israelites struck them down, leaving no survivors or refugees.