Joshua chose two men as spies and sent them from their camp at Acacia with these instructions: “Go across the river and find out as much as you can about the whole region, especially about the town of Jericho.”
The two spies left the Israelite camp at Acacia and went to Jericho, where they decided to spend the night at the house of a prostitute named Rahab.
But someone found out about them and told the king of Jericho, “Some Israelite men came here tonight, and they are spies.” So the king sent soldiers to Rahab's house to arrest the spies.
Meanwhile, Rahab had taken the men up to the flat roof of her house and had hidden them under some piles of flax plants that she had put there to dry.
The soldiers came to her door and demanded, “Let us have the men who are staying at your house. They are spies.”
She answered, “Some men did come to my house, but I didn't know where they had come from. They left about sunset, just before it was time to close the town gate. I don't know where they were going, but if you hurry, maybe you can catch them.”
The guards at the town gate let the soldiers leave Jericho, but they closed the gate again as soon as the soldiers went through. Then the soldiers headed toward the Jordan River to look for the spies at the place where people cross the river.
Rahab went back up to her roof. The spies were still awake, so she told them:
I know that the LORD has given Israel this land. Everyone shakes with fear because of you. We heard how the LORD dried up the Red Sea so you could leave Egypt. And we heard how you destroyed Sihon and Og, those two Amorite kings east of the Jordan River. We know that the LORD your God rules heaven and earth, and we've lost our courage and our will to fight.
Please promise me in the LORD's name that you will be as kind to my family as I have been to you. Do something to show that you won't let your people kill my father and mother and my brothers and sisters and their families.
“Rahab,” the spies answered, “if you keep quiet about what we're doing, we promise to be kind to you when the LORD gives us this land. We pray that the LORD will kill us if we don't keep our promise!”