Joshua said to the two men who had scouted the land, “Go to the prostitute’s house and bring the woman out of there, and all who are with her, just as you promised her.”
The Gibeonites were not Israelites but rather a remnant of the Amorites. The Israelites had taken an oath concerning them, but Saul had tried to kill them in his zeal for the Israelites and Judah. So David summoned the Gibeonites and spoke to them.
“As I live” — this is the declaration of the Lord God — “he will die in Babylon, in the land of the king who put him on the throne, whose oath he despised and whose covenant he broke.
But the city and everything in it are set apart to the Lord for destruction. Only Rahab the prostitute and everyone with her in the house will live, because she hid the men we sent.
So the young men who had scouted went in and brought out Rahab and her father, mother, brothers, and all who belonged to her. They brought out her whole family and settled them outside the camp of Israel.