Then Joshua sent two spies from the camp at Acacia with orders to go and secretly explore the land of Canaan, especially the city of Jericho. When they came to the city, they went to spend the night in the house of a prostitute named Rahab.
"Some men did come to my house," she answered, "but I don't know where they were from. They left at sundown before the city gate was closed. I didn't find out where they were going, but if you start after them quickly, you can catch them." (Now Rahab had taken the two spies up on the roof and hidden them under some stalks of flax that she had put there.)
The king's men left the city, and then the gate was shut. They went looking for the Israelite spies as far as the place where the road crosses the Jordan.
We have heard how the LORD dried up the Red Sea in front of you when you were leaving Egypt. We have also heard how you killed Sihon and Og, the two Amorite kings east of the Jordan.
The men said to her, "May God take our lives if we don't do as we say! If you do not tell anyone what we have been doing, we promise you that when the LORD gives us this land, we will treat you well."
"Go into the hill country," she said, "or the king's men will find you. Hide there for three days until they come back. After that, you can go on your way."
This is what you must do. When we invade your land, tie this red cord to the window you let us down from. Get your father and mother, your brothers, and all your father's family together in your house.
If anyone goes out of the house, his death will be his own fault, and we will not be responsible; but if anyone in the house with you is harmed, then we will be responsible.
The spies went into the hills and hid. The king's men looked for them all over the countryside for three days, but they did not find them, so they returned to Jericho.