Joshuah carries out a deceptive tactic against the men of Ai. He acts like they are defeated and retreats when in fact that is part of the plan to defeat the enemy. Very similar to the crucifixion of Jesus. What appeared to be a defeat to the forces of light actually secured an everlasting victory.