John Calvin's Bible Commentary
Joshua 8:18
18.And the Lord said unto Joshua, etc This passage shows, that owing either to the strong fortifications of the city, or the valor of its inhabitants, or the trepidation of the Israelites, the victory was difficult, since God promises that he himself would take it by the lifting up of a spear. Had success been beyond doubt, the symbol would have been superfluous; their minds must therefore have been anxious and perplexed, since the Lord, to prevent them from fainting, raises up a banner of confidence in the hand of Joshua. It is true, indeed, that shortly after a different motive for raising the spear is mentioned, when it is said, that in this way a signal was given to the ambuscade, which accordingly rushed forth. But if it really was so used as a signal, it will scarcely do to regard the spear as a manifestation of the victorious power of God dispelling all doubt. Still, however, as it is not expressly said that the spear was the cause which brought forth the soldiers who had been placed in ambuscade, the truth may be that they came forth of their own accord, either because it was the suitable time, or because the shouting and noise made them aware that the battle had actually commenced. For it is scarcely possible to believe that the spear was seen by them, when we consider the long space which intervened, and more especially that Joshua was standing in a valley. Moreover, if we hold that the lifting up of the spear, though intended for a different purpose, had also the effect of inspiring them with additional courage, there will be no absurdity in it.
This much ought to be regarded as certain, first, that by this solemn badge they were rendered more certain of the happy issue of the battle; and secondly, that Joshua had no other intention than to incite his troops according to the command of God. For it is at last added, that Joshua did not draw back his hand until the city was taken, the enemy everywhere destroyed, and the war itself terminated. Hence it appears that he exhibited it in the middle of the conflict as an ensign of triumph, that the Israelites might have no doubt of success. For although he ordered them to engage and use their arms bravely, he at the same time distinctly declared that they had already conquered.
The course of the battle is rendered somewhat obscure by the same thing being told twice, but the substance is sufficiently plain. The children of Israel retreated feigning fear, and the battle had not actually commenced before the inhabitants of Ai were precluded from returning and defending their city. After the two armies had come to close quarters, the ambuscade arose and made such haste that the flames of the conflagration were rising from the city when the enemy turned their backs. From this we may infer that the city was in the possession of the Israelites, but that the chief slaughter took place when those who were in the city came forth to take part in the battle, because the inhabitants, hemmed in on all sides, found resistance and flight equally unavailing. They were thus seized with despair, and, huddled together in a narrow space, were everywhere cut down.
The statement, that the slaughter did not take place in the city before those who had feigned flight returned, I understand to mean, that the whole troops uniting their forces rushed in, seized the prey, and slew all who might have been left. If any one objects that the city was burnt while the battle was going on, I answer, that the fire was indeed applied so as to let both armies know that the city was in possession of the Israelites, but it was not actually destroyed by fire. It was not practicable in a moment of time to seize and carry off the booty, nay, to bring the vessels and a large part of the property without the walls; and it would have been absurd voluntarily to destroy spoils which God had granted. We see, then, that the first fire was not kindled for the purpose of destroying the whole city, but was merely a partial conflagration giving intimation of its capture, and that the Israelites entered at the open gates without bloodshed or a struggle. This is confirmed shortly after, when the burning is ascribed to Joshua himself, not only because it was burnt under his command, but because he was careful, after returning from the battle, to see that it was utterly destroyed; as it is immediately added that he made it a heap of stones in order that it might be a perpetual desolation. (76)