And the LORD said unto Joshua, Fear not, neither be thou dismayed: take all the people of war with thee, and arise, go up to Ai: see, I have given into thy hand the king of Ai, and his people, and his city, and his land:
Take all the people — That all of them might be partakers of this first spoil, and thereby encouraged to proceed in their work. The weak multitude indeed were not to go, because they might have hindered them in the following stratagem; and it was but fit that the military men who run the greatest hazards, should have the precedency in the spoils.
 And thou shalt do to Ai and her king as thou didst unto Jericho and her king: only the spoil thereof, and the cattle thereof, shall ye take for a prey unto yourselves: lay thee an ambush for the city behind it.
To Ai — That is, the city and people of Ai.
Unto Jericho and her king — That is, overcome and destroy them. This was enjoined to chastise their last insolence, and the triumphs and blasphemies which doubtless their success had produced: and to revive the dread and terror which had been impressed upon the Canaanites by Jericho's ruin, and had been much abated by the late success of Ai.
 So Joshua arose, and all the people of war, to go up against Ai: and Joshua chose out thirty thousand mighty men of valour, and sent them away by night.
To go up against Ai — That is, to consider about this expedition; not as if all the people of war did actually go up, which was both unnecessary and burdensome: but it seems to be resolved by Joshua and all the council of war, that the thirty thousand here following should be selected for the enterprize. Either, 1, the thirty thousand now mentioned; or, 2. part of them; namely, such as were to lie in wait; and these were only five thousand men, as is expressed, verse 12.
 And he commanded them, saying, Behold, ye shall lie in wait against the city, even behind the city: go not very far from the city, but be ye all ready:
Them — The same party last spoken of, even the five thousand mentioned verse 3.
 And I, and all the people that are with me, will approach unto the city: and it shall come to pass, when they come out against us, as at the first, that we will flee before them,
That are — Or, that shall be: for at present he sent them away, verse 10,11.
That we — I and the twenty five thousand with me.
 Joshua therefore sent them forth: and they went to lie in ambush, and abode between Bethel and Ai, on the west side of Ai: but Joshua lodged that night among the people.
Sent them — The same party.
Among the people — Heb. that people, the people of war as they are called, verse 11, that is, the main body of the host consisting of thirty thousand.
 And Joshua rose up early in the morning, and numbered the people, and went up, he and the elders of Israel, before the people to Ai.
The people — Heb. that people, not all the people of Israel; which was needless, and required more time than could now be spared; but the rest of that host of thirty thousand, whereof five thousand were sent away; the remainder are numbered, to see whether some of them had not withdrawn themselves, taking the advantage of the night, and of the design of laying an ambush; and that it might be evident, this work was done without any loss of men, whereby they might be encouraged to trust in God, and to proceed resolutely in their work.
The elders of Israel — The chief magistrates and rulers of Israel under Joshua; and these, I suppose, went with Joshua, and with the army, to take care that the cattle and the spoil of the city, which was given by God to all Israel for a prey, verse 2,27, might be justly and equally divided between those that went to battle, and the rest of the people.
 And all the people, even the people of war that were with him, went up, and drew nigh, and came before the city, and pitched on the north side of Ai: now there was a valley between them and Ai.
That were with him — Namely, the thirty thousand mentioned, verse 3, or the most of them.
 And he took about five thousand men, and set them to lie in ambush between Bethel and Ai, on the west side of the city.
And he took — Or rather, but he had taken, namely, out of the said number of thirty thousand, for this is added by way of recapitulation and farther explication of what is said in general, verse 9.
 And when they had set the people, even all the host that was on the north of the city, and their liers in wait on the west of the city, Joshua went that night into the midst of the valley.
Joshua went — Namely, accompanied with a small part of the host now mentioned, that is, very early in the morning, when it was yet dark, as is said in a like case, 14.
The valley — Which was near the city, thereby to allure them forth.
 And it came to pass, when the king of Ai saw it, that they hasted and rose up early, and the men of the city went out against Israel to battle, he and all his people, at a time appointed, before the plain; but he wist not that there were liers in ambush against him behind the city.
His people — Namely, all his men of war, for the rest were left in Ai, verse 16.
At a time appointed — At a certain hour agreed upon between the king and people of Ai, and of Bethel too, who were their confederates in this enterprize, as it may seem from verse 17. Possibly they might appoint the same hour of the day on which they had fought against Israel with good success, looking upon it as a lucky hour.
Before the plain — That is, towards or in sight of that plain or valley in which the Israelites were, that so they might put themselves in battle-array.
Against him — The former success having made him secure, as is usual in such cases; God also blinding his mind, and infatuating him, as he useth to do with those whom he intends to destroy.
 And Joshua and all Israel made as if they were beaten before them, and fled by the way of the wilderness.
Made as if they were beaten — That is, fled from them, as it were for fear of a second blow.
The wilderness — Which lay between Ai and Jericho, whither they now seemed to flee.
 And all the people that were in Ai were called together to pursue after them: and they pursued after Joshua, and were drawn away from the city.
All the people — Namely, all that were able to bear arms, for old men and children were unfit for the pursuit or fight; and that they were yet left, may seem from verse 24,25.
 And there was not a man left in Ai or Bethel, that went not out after Israel: and they left the city open, and pursued after Israel.
Not a man — Namely, fit for war.
Bethel — Which, being a neighbouring city, and encouraged by the former success, had sent some forces to assist them; and now, upon notice sent to them of the flight of their common enemies, or upon some other signal given, all their men of war join with those of Ai in the pursuit.
 And the LORD said unto Joshua, Stretch out the spear that is in thy hand toward Ai; for I will give it into thine hand. And Joshua stretched out the spear that he had in his hand toward the city.
Stretch out the spear — This was, either, 1. for a sign to his host present with him, to stop their flight, and make head against the pursuers: or, 2. for a signal to the liers in wait, or, 3. as a token of God's presence and assistance with them, and of their victory.
 And the ambush arose quickly out of their place, and they ran as soon as he had stretched out his hand: and they entered into the city, and took it, and hasted and set the city on fire.
Set the city on fire — Not all of it, as appears from verse 28, and because then they had lost that prey which God had allowed them; but part of it, enough to raise a smoke, and give notice to their brethren of their success.
 And when Joshua and all Israel saw that the ambush had taken the city, and that the smoke of the city ascended, then they turned again, and slew the men of Ai.
All Israel — That is, all the Israelites there present.
 And the other issued out of the city against them; so they were in the midst of Israel, some on this side, and some on that side: and they smote them, so that they let none of them remain or escape.
The other — They who lay in ambush.
 And the king of Ai they took alive, and brought him to Joshua.
Took alive — Reserving him to a more ignominious punishment.
 And it came to pass, when Israel had made an end of slaying all the inhabitants of Ai in the field, in the wilderness wherein they chased them, and when they were all fallen on the edge of the sword, until they were consumed, that all the Israelites returned unto Ai, and smote it with the edge of the sword.
Smote it — That is, the inhabitants of it, the men, who through age or infirmity were unfit for war, and the women, verse 25.
 And so it was, that all that fell that day, both of men and women, were twelve thousand, even all the men of Ai.
Of Ai — Not strictly, but largely so called, who were now in Ai, either as constant and settled inhabitants, or as sojourners and such as came to them for their help.
 For Joshua drew not his hand back, wherewith he stretched out the spear, until he had utterly destroyed all the inhabitants of Ai.
Drew not his hand back — He kept his hand and spear in the same posture, both stretched out and lifted up, as a sign both to encourage them, and to direct them to go on in the work.
 And the king of Ai he hanged on a tree until eventide: and as soon as the sun was down, Joshua commanded that they should take his carcase down from the tree, and cast it at the entering of the gate of the city, and raise thereon a great heap of stones, that remaineth unto this day.
Hanged on a tree — He dealt more severely with the kings of Canaan than with the people, because the abominable wickedness of that people was not restrained and punished (as it should have been) but countenanced and encouraged by their evil examples; and because they were the principal authors of the destruction of their own people, by engaging them in an obstinate opposition against the Israelites.
Down from the tree — According to God's command in that case, Deuteronomy 21:22.
The gate of the city — Which place he chose either as most commodious, now especially when all the city within the gate was already turned in to an heap of stones and rubbish; or because this was the usual place of judgment; and therefore proper to bear the monument of God's just sentence against him, not without reflection upon that injustice which he had been guilty of in that place.
 Then Joshua built an altar unto the LORD God of Israel in mount Ebal,
Then — Namely, after the taking of Ai. For they were obliged to do this, when they were brought over Jordan into the land of Canaan, 27:2,3, which is not to be understood strictly, as if it were to be done the same day; for it is manifest they were first to be circumcised, and to eat the passover, which they did, and which was the work of some days; but as soon as they had opportunity to do it, which was now when these two great frontier cities were taken and destroyed, and thereby the coast cleared, and the bordering people under great consternation, so that all the Israelites might securely march thither. And indeed this work was fit to be done as soon as might be, that thereby they might renew their covenant with God, by whose help alone they could expect success in their great and difficult enterprize.
Built an altar — Namely, for the offering of sacrifices, as appears from the following verse.
Mount Ebal — God's altar was to be but in one place, Deuteronomy 27:4,5, which also seems most proper, that in that place whence the curses of the law were denounced against sinners, there might also be the tokens and means of grace, and peace, and reconciliation with God, for the removing of the curses, and the procuring of God's blessing to sinners.
 And he wrote there upon the stones a copy of the law of Moses, which he wrote in the presence of the children of Israel.
Upon the stones — Not upon the stones of the altar, which were to be rough and unpolished, verse Deuteronomy 27:2.
The law of Moses — Not certainly the whole five books of Moses, for what stones and time would have sufficed for this, but the most weighty parts of the law, and especially the law of the ten commandments.
 And all Israel, and their elders, and officers, and their judges, stood on this side the ark and on that side before the priests the Levites, which bare the ark of the covenant of the LORD, as well the stranger, as he that was born among them; half of them over against mount Gerizim, and half of them over against mount Ebal; as Moses the servant of the LORD had commanded before, that they should bless the people of Israel.
All Israel — That is, the whole congregation, old and young, male and female.
That side — Some on one side of it, and some on the other.
Mount Gerizim — These two places were in the tribe of Ephraim, not far from Shechem, as appears both from scripture, and from other authors.
Bless — Or curse, which is easily understood out of the following verse.
 And afterward he read all the words of the law, the blessings and cursings, according to all that is written in the book of the law.
Afterward — After the altar was built, and the stones plaistered and writ upon.
He read — That is, he commanded the priests or Levites to read, Deuteronomy 27:14.
Blessings and cursings — Which words came in not by way of explication, as if the words of the law were nothing else besides the blessings and curses; but by way of addition, to note that these were read over and above the words of the law.
 There was not a word of all that Moses commanded, which Joshua read not before all the congregation of Israel, with the women, and the little ones, and the strangers that were conversant among them.
Read not — Therefore he read not the blessings and curses only, as some think, but the whole law, as the manner was when all Israel, men and women, were assembled together, or the ten commandments.
Among them — Who were proselytes, for no others can be supposed to be with them at this time.