Joshua son of Nun secretly sent two men as spies from Acacia Grove, saying, "Go and scout the land, especially Jericho." So they left, and they came to the house of a woman, a prostitute named Rahab, and stayed there.
References for Joshua 2:1
The king of Jericho was told, "Look, some of the Israelite men have come here tonight to investigate the land."
Then the king of Jericho sent [word] to Rahab and said, "Bring out the men who came to you and entered your house, for they came to investigate the entire land."
But the woman had taken the two men and hidden them. So she said, "Yes, the men did come to me, but I didn't know where they were from.
At nightfall, when the gate was about to close, the men went out, and I don't know where they were going. Chase after them quickly, and you can catch up with them!"
But she had taken them up to the roof and hidden them among the stalks of flax that she had arranged on the roof.
The men pursued them along the road to the fords of the Jordan, and as soon as they left to pursue them, the gate was shut.
Before the men fell asleep, she went up on the roof
References for Joshua 2:8
and said to them, "I know that the Lord has given you this land and that dread of you has fallen on us, and everyone who lives in the land is panicking because of you.
References for Joshua 2:9
For we have heard how the Lord dried up the waters of the Red Sea before you when you came out of Egypt, and what you did to Sihon and Og, the two Amorite kings you completely destroyed across the Jordan.
References for Joshua 2:10
When we heard this, we lost heart, and everyone's courage failed because of you, for the Lord your God is God in heaven above and on earth below.
References for Joshua 2:11
Now please swear to me by the Lord that you will also show kindness to my family, because I showed kindness to you. Give me a sure sign
References for Joshua 2:12
that you will spare the lives of my father, mother, brothers, sisters, and all who belong to them, and save us from death."
The men answered her, "[We will give] our lives for yours. If you don't report our mission, we will show kindness and faithfulness to you when the Lord gives us the land."
Then she let them down by a rope through the window, since she lived in a house that was [built] into the wall of the city.
"Go to the hill country so that the men pursuing you won't find you," she said to them. "Hide yourselves there for three days until they return; afterwards, go on your way."
The men said to her, "We will be free from this oath you made us swear,
unless, when we enter the land, you tie this scarlet cord to the window through which you let us down. Bring your father, mother, brothers, and all your father's family into your house.
If anyone goes out the doors of your house, his blood will be on his own head, and we will be innocent. But if anyone with you in the house should be harmed, his blood will be on our heads.
References for Joshua 2:19
And if you report our mission, we are free from the oath you made us swear."
"Let it be as you say," she replied, and she sent them away. After they had gone, she tied the scarlet cord to the window.
So the two men went into the hill country and stayed there three days until the pursuers had returned. They searched all along the way, but did not find them.
Then the men returned, came down from the hill country, and crossed [the Jordan]. They went to Joshua son of Nun and reported everything that had happened to them.
They told Joshua, "The Lord has handed over the entire land to us. Everyone who lives in the land is also panicking because of us."
References for Joshua 2:24