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.”
The king summoned the Gibeonites and spoke to them. (Now the Gibeonites were not a part of Israel but were survivors of the Amorites; the Israelites had sworn to spare them, but Saul in his zeal for Israel and Judah had tried to annihilate them.)
“ ‘As surely as I live, declares the Sovereign Lord, he shall die in Babylon, in the land of the king who put him on the throne, whose oath he despised and whose treaty he broke.
The city and all that is in it are to be devoted 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.
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.