Verse 17: And the city shall be accursed (or, devoted; Lev. 27:28; Mic. 4:13), even it, and all that are therein, to the LORD: only Rahab the harlot shall live, she and all that are with her in the house, because she hid the messengers that we sent.
[Let it be accursed] Let it be altogether wiped out and destroyed (Vatablus). Let it be accursed by vow; see Deuteronomy 12 and what follows (Grotius). What חֶרֶם, a devoted thing, is, see on Leviticus 27:21, 29 (Bonfrerius). It is the same thing as ἀνάθεμα/anathema, a devoted thing, to the Greeks (Masius). Thus is called both what is dedicated in sacred places, and what is immolated and destroyed (Masius on verse 19, similarly Lapide). It signifies: 1. a thing devoted to God; 2. the very destruction of the thing; 3. things accursed and worthy of destruction, as in verse 18. But there is one and the same reason for those diverse notions, That what things were dedicated to God, those were able to be among no man’s goods (Masius). In other cities of the Canaanites there was to be a sparing of nothing; but here the very city was to be burned. What is the reason? 1. God was requiring this city as the firstfruits (Lapide, Hebrews and Jonathan and Theodotion in Masius). But the firstfruits ought to be rendered untouched to the Lord (Lapide). 2. Lest in this beginning of the war, the eager soldier in need of all things, with immoderate plunder taken, as this was a most opulent city, should excessively burden himself, and should become prone more to leisure and then to luxury than to war (Masius). 3. They long since deserved this for their long standing and most shameful acts (Bonfrerius). So that all, being instructed by the loss of plunder, might understand that the victory is acquired by the power of God alone, and might ascribe nothing to their own strength (Masius). But, in conquering other cities, the Hebrews fought fiercely (Lapide). 5. By the severity of the first punishment God willed to instill terror in the rest of the enemies (and to call them to repentance), since a war of the very harshest kind was continuing (Masius, similarly Lapide).
Accursed, that is, devoted to utter destruction, Leviticus 27:21, 29; Deuteronomy 12. This he spake by instinct or direction from God, as is evident from 1 Kings 16:34. To the Lord; partly, because the firstfruits were appropriated to God; partly, lest the soldiers being glutted with the spoil of this rich city, should grow sensual and sluggish in their work; and partly, to strike the greater terror into the rest of their enemies.
[Let Rahab alone live] Through you; that is, let her remain alive (Piscator). I prefer to translate חָיָה as to be saved, because it is also said of that which is in her house, in which verse 23 teaches that furniture is include (Masius).
[She hid, הֶחְבְּאַתָה] The last letter is duplicated; it is put in the place of הֶחְבְּאָה, which would normally be expressed הֶחְבִּיאָה (Piscator). Thus יְשׁוּעָתָה is an omnimodal salvation (Drusius). They translate it, she hid in honesty, or faithfully (Junius and Tremellius, Piscator, Drusius). Two reasons for her discharge are assigned: 1. Religion, on account of the oath, concerning which verse 22. Although Joshua or the people were not able to be obliged by that, because it was not undertaken by their authority (Bonfrerius). 2. Gratitude, which is here indicated (Bonfrerius, similarly Masius).
 Hebrew: וְהָיְתָ֙ה הָעִ֥יר חֵ֛רֶם הִ֥יא וְכָל־אֲשֶׁר־בָּ֖הּ לַֽיהוָ֑ה רַק֩ רָחָ֙ב הַזּוֹנָ֜ה תִּֽחְיֶ֗ה הִ֚יא וְכָל־אֲשֶׁ֣ר אִתָּ֣הּ בַּבַּ֔יִת כִּ֣י הֶחְבְּאַ֔תָה אֶת־הַמַּלְאָכִ֖ים אֲשֶׁ֥ר שָׁלָֽחְנוּ׃
 Hebrew: חֵרֶם.
 Hebrew: רַק֩ רָחָ֙ב הַזּוֹנָ֜ה תִּֽחְיֶ֗ה.