Hashem doesn't need weapons with which to win a battle. One person can pursue an entire army if Hashem wills it. We have seen that happen in the Six-Day War. All we need is for Hashem to inject a fear of panic into the enemy, and they flee. Yet this was a lesson to teach us for the future.
In this first act of actual battle with Ai, Yehoshua selected 30,000 soldiers and told them to wait behind the city of Ai. There was one section behind and one on each side, waiting there in the dark that is surrounding the city. Yehoshua himself, with the bulk of the Jewish army, would advance onto the city in a frontal attack. The city of Ai would be overconfident. They had defeated the Jews the first time, so they would have nothing to fear. As Yehoshua advanced with his army, the king of Ai came out to greet him with the entire army of Ai. Yehoshua pretended fear and ordered a retreat to the front. Part of his soldiers. The king of Ai urged his men on: “Attack and destroy.” That was his command. In order to attack and destroy, they had to leave the city of Ai completely. Yehoshua began to flee with his army. They left the city of Ai. When they were completely outside the city of Ai, Yehoshua suddenly turned, held his spear very high in the air, and signaled for the three other branches of the army to enter the city. They did this immediately, set fire to the city, and high, large pillars of smoke and flame rose into the air. The people of Ai, the army, turned back and saw their city in flames. This broke their morale, broke their hope, and then they were being attacked from all sides. They were completely wiped out. The king of the city of Ai was taken captive. He was killed by Yehoshua.
There’s a vital lesson the Torah teaches us. If you ever have pity, compassion for someone who does not deserve it, then this is the highest degree of absurdity, sadism, and heartlessness. The Torah itself says that it is a crime without pity for those whom Hashem commands to be wiped out. The final word of Yehoshua before his passing was the last will and testament, where he told the Jews, “We have been successful; we shall be successful forever if you continue to have faith in Hashem and live up to the image of Hashem.” The Torah never deserts this faith. It is only through your own deeds, if you turn to the wrong path, that you find yourselves a lost people. But we know, too, that Hashem has promised that the moment the Jews turn back to Hashem, they are the ones who were chosen by Hashem for the land of Israel. These two go together. The Jews belong there to study the Torah there, to worship Hashem there. We have full confidence and faith that this victory is what comes. We should be so happy to see it with our eyes. Very shortly, we’ll be coming at Moshiach (Messiah). We’ll see the rebuilding of the Beit Hamikdash (the Holy Temple).