Then Joshua secretly sent out two spies from the Israelite camp at Acacia. He instructed them, "Spy out the land on the other side of the Jordan River, especially around Jericho." So the two men set out and came to the house of a prostitute named Rahab and stayed there that night.
References for Joshua 2:1
But someone told the king of Jericho, "Some Israelites have come here tonight to spy out the land."
So the king of Jericho sent orders to Rahab: "Bring out the men who have come into your house. They are spies sent here to discover the best way to attack us."
Rahab, who had hidden the two men, replied, "The men were here earlier, but I didn't know where they were from.
They left the city at dusk, as the city gates were about to close, and I don't know where they went. If you hurry, you can probably catch up with them."
(But she had taken them up to the roof and hidden them beneath piles of flax.)
So the king's men went looking for the spies along the road leading to the shallow crossing places of the Jordan River. And as soon as the king's men had left, the city gate was shut.
Before the spies went to sleep that night, Rahab went up on the roof to talk with them.
"I know the LORD has given you this land," she told them. "We are all afraid of you. Everyone is living in terror.
For we have heard how the LORD made a dry path for you through the Red Sea when you left Egypt. And we know what you did to Sihon and Og, the two Amorite kings east of the Jordan River, whose people you completely destroyed.
References for Joshua 2:10
No wonder our hearts have melted in fear! No one has the courage to fight after hearing such things. For the LORD your God is the supreme God of the heavens above and the earth below.
Now swear to me by the LORD that you will be kind to me and my family since I have helped you. Give me some guarantee that
when Jericho is conquered, you will let me live, along with my father and mother, my brothers and sisters, and all their families."
"We offer our own lives as a guarantee for your safety," the men agreed. "If you don't betray us, we will keep our promise when the LORD gives us the land."
Then, since Rahab's house was built into the city wall, she let them down by a rope through the window.
"Escape to the hill country," she told them. "Hide there for three days until the men who are searching for you have returned; then go on your way."
Before they left, the men told her, "We can guarantee your safety
only if you leave this scarlet rope hanging from the window. And all your family members -- your father, mother, brothers, and all your relatives -- must be here inside the house.
If they go out into the street, they will be killed, and we cannot be held to our oath. But we swear that no one inside this house will be killed -- not a hand will be laid on any of them.
If you betray us, however, we are not bound by this oath in any way."
"I accept your terms," she replied. And she sent them on their way, leaving the scarlet rope hanging from the window.
The spies went up into the hill country and stayed there three days. The men who were chasing them had searched everywhere along the road, but they finally returned to the city without success.
Then the two spies came down from the hill country, crossed the Jordan River, and reported to Joshua all that had happened to them.
"The LORD will certainly give us the whole land," they said, "for all the people in the land are terrified of us."