Verse 25: And Joshua said unto them, (Deut. 31:6, 8; Josh. 1:9) Fear not, nor be dismayed, be strong and of good courage: for (Deut. 3:21; 7:19) thus shall the LORD do to all your enemies against whom ye fight.
[Fear not] They had need of encouragements of this sort, because they had imagined that people invincible and as having the strength of giants, Numbers 13; 14. It is to be noted here that Joshua first says those things that might banish their fear, then those things that might increase their resolve; while God does the contrary. That is, God’s words by their own power produce courage, etc. (Masius).
[To your enemies] Thus he calls them by no other name, than that they were the enemies of God, and to be destroyed by His kingdom (Masius).
Verse 26: And afterward Joshua smote them, and slew them, and hanged them on five trees: and they (Josh. 8:29) were hanging upon the trees until the evening.
[And he hanged] Not for punishment, which was not able to be inflicted upon the dead; but for public report and example, and so that he might cut off all their hope of impunity for their vices. See Numbers 25:4 (Masius).
He hanged them, after they were dead, as a brand of infamy, and for the terror and instruction of others.
Verse 27: And it came to pass at the time of the going down of the sun, that Joshua commanded, and they (Deut. 21:23; Josh. 8:29) took them down off the trees, and cast them into the cave wherein they had been hid, and laid great stones in the cave’s mouth, which remain until this very day.
[And while the sun was setting, he commanded (similarly the Septuagint, Jonathan, Syriac, Arabic, Montanus, Junius and Tremellius, Piscator)] But Bonfrerius maintains that that while the sun was setting is not to be referred to the he commanded, as if at that time the commandment was given by Joshua, who was remaining there, since he seized yet two cities on that day [concerning which see on the following verse], but to the that they take down (Bonfrerius).
[Into the cave, etc.] This was done, 1. For a monument, or for the perpetual memory of the event (Menochius, Masius). This cave was famous at that time. 2. Lest the bodies, having been dragged out by wild beasts, should come into the sight of men (Masius). 3. Lest anyone should be able to remove the bodies for an honorable burial (Menochius).
Laid great stones in the cave’s mouth; that neither wild beasts could come at them to devour them, nor any of their people to give them honourable burial.
 Hebrew: וַיֹּ֤אמֶר אֲלֵיהֶם֙ יְהוֹשֻׁ֔עַ אַל־תִּֽירְא֖וּ וְאַל־תֵּחָ֑תּוּ חִזְק֣וּ וְאִמְצ֔וּ כִּ֣י כָ֗כָה יַעֲשֶׂ֤ה יְהוָה֙ לְכָל־אֹ֣יְבֵיכֶ֔ם אֲשֶׁ֥ר אַתֶּ֖ם נִלְחָמִ֥ים אוֹתָֽם׃
 See Deuteronomy 31:6, 8; Joshua 1:9.
 Hebrew: וַיַּכֵּ֙ם יְהוֹשֻׁ֤עַ אַֽחֲרֵי־כֵן֙ וַיְמִיתֵ֔ם וַיִּתְלֵ֕ם עַ֖ל חֲמִשָּׁ֣ה עֵצִ֑ים וַיִּֽהְי֛וּ תְּלוּיִ֥ם עַל־הָעֵצִ֖ים עַד־הָעָֽרֶב׃
 Hebrew: וַיְהִ֞י לְעֵ֣ת׀ בּ֣וֹא הַשֶּׁ֗מֶשׁ צִוָּ֤ה יְהוֹשֻׁ֙עַ֙ וַיֹּֽרִידוּם֙ מֵעַ֣ל הָעֵצִ֔ים וַיַּ֙שְׁלִכֻ֔ם אֶל־הַמְּעָרָ֖ה אֲשֶׁ֣ר נֶחְבְּאוּ־שָׁ֑ם וַיָּשִׂ֜מוּ אֲבָנִ֤ים גְּדֹלוֹת֙ עַל־פִּ֣י הַמְּעָרָ֔ה עַד־עֶ֖צֶם הַיּ֥וֹם הַזֶּֽה׃
 Hebrew: וַיְהִ֞י לְעֵ֣ת׀ בּ֣וֹא הַשֶּׁ֗מֶשׁ צִוָּ֤ה יְהוֹשֻׁ֙עַ֙.