17 The city and all that is in it are to be devoted[1] to the Lord. Only Rahab the prostitute and all who are with her in her house shall be spared, because she hid the spies we sent. 18 But keep away from the devoted things, so that you will not bring about your own destruction by taking any of them. Otherwise you will make the camp of Israel liable to destruction and bring trouble on it. 19 All the silver and gold and the articles of bronze and iron are sacred to the Lord and must go into his treasury." 20 When the trumpets sounded, the army shouted, and at the sound of the trumpet, when the men gave a loud shout, the wall collapsed; so everyone charged straight in, and they took the city. 21 They devoted the city to the Lord and destroyed with the sword every living thing in it-men and women, young and old, cattle, sheep and donkeys. 22 Joshua said to the two men who had spied out the land, "Go into the prostitute's house and bring her out and all who belong to her, in accordance with your oath to her." 23 So the young men who had done the spying went in and brought out Rahab, her father and mother, her brothers and sisters and all who belonged to her. They brought out her entire family and put them in a place outside the camp of Israel. 24 Then they burned the whole city and everything in it, but they put the silver and gold and the articles of bronze and iron into the treasury of the Lord's house. 25 But Joshua spared Rahab the prostitute, with her family and all who belonged to her, because she hid the men Joshua had sent as spies to Jericho-and she lives among the Israelites to this day.

Matthew Henry's Commentary on Joshua 6:17-25

Commentary on Joshua 6:17-27

(Read Joshua 6:17-27)

Jericho was to be a solemn and awful sacrifice to the justice of God, upon those who had filled up the measure of their sins. So He appoints, from whom, as creatures, they received their lives, and to whom, as sinners, they had forfeited them. Rahab perished not with them that believed not, Acts 14:31. She, and they with her, were plucked as brands from the burning. With Rahab, or with the men of Jericho; our portion must be assigned, as we posses or disregard the sign of salvation; even faith in Christ, which worketh by love. Let us remember what depends upon our choice, and let us choose accordingly. God shows the weight of a Divine curse; where it rests there is no getting from under it; for it brings ruin without remedy.