Joshua, Nun's son, secretly sent two men as spies from Shittim. He said, "Go. Look over the land, especially Jericho." They set out and entered the house of a prostitute named Rahab. They bedded down there.
Someone told the king of Jericho, "Men from the Israelites have come here tonight to spy on the land."
So the king of Jericho sent word to Rahab: "Send out the men who came to you, the ones who came to your house, because they have come to spy on the entire land."
But the woman had taken the two men and hidden them. Then she said, "Of course the men came to me. But I didn't know where they were from.
The men left when it was time to close the gate at dark, but I don't know where the men went. Hurry! Chase after them! You might catch up with them."
But she had taken them up to the roof and hidden them under the flax stalks that she had laid out on the roof.
The men from Jericho chased after them in the direction of the Jordan up to the fords. As soon as those chasing them went out, the gate was shut behind them.
Before the spies bedded down, Rahab went up to them on the roof.
She said to the men, "I know that the LORD has given you the land. Terror over you has overwhelmed us. The entire population of the land has melted down in fear because of you.
We have heard how the LORD dried up the water of the Reed Sea in front of you when you left Egypt. We have also heard what you did to Sihon and Og, the two kings of the Amorites on the other side of the Jordan. You utterly wiped them out.
We heard this and our hearts turned to water. Because of you, people can no longer work up their courage. This is because the LORD your God is God in heaven above and on earth below.
Now, I have been loyal to you. So pledge to me by the LORD that you in turn will deal loyally with my family. Give me a sign of good faith.
Spare the lives of my father, mother, brothers, and sisters, along with everything they own. Rescue us from death."
The men said to her, "We swear by our own lives to secure yours. If you don't reveal our mission, we will deal loyally and faithfully with you when the LORD gives us the land."
So she lowered the spies on a rope through the window. Her house was on the outer side of the city wall, and she lived inside the wall.
Then she said to them, "Go toward the highlands so that those chasing you don't run into you. Hide there for three days until those chasing you return. Then you may go on your way."
The men said to her, "We won't be responsible for this pledge you made us swear
unless, when we come into the land, you tie this red woven cord in the window through which you lowered us. Gather your father, your mother, your brothers, and your whole family into the house with you.
Those who go outside the doors of your house into the street will have only themselves to blame for their own deaths. We won't be responsible. If anyone lays a hand on those who are with you in the house, we will take the blame for their death.
But if you reveal our mission, we won't be responsible for this pledge you made us swear."
She said, "These things will happen just like you said." She sent them away and they went off. Then she tied the red cord in the window.
The spies went out and entered the highlands. They stayed there for three days until those chasing them came back. Those chasing them had searched all along the road but never found them.
Then the two men came back down from the highlands. They crossed the Jordan and came to Joshua, Nun's son. They told him everything that had happened to them.
They said to Joshua, "The LORD has definitely given the entire land into our power. In addition, all of the land's population has melted down in fear because of us."