Joshua 8:20-21

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.