Someone saw the spies and reported them to the king of Jericho. So the king of Jericho sent men to capture the two spies.
When the men came to Rahab’s house to search for the two spies, Rahab decided to help the two spies.
Rahab tricked the men, saying, “The two men did came but they had left. I don’t know where they are from. When the city gate was about to shut, the two men slipped out. If you pursue them now, you might catch up with them.”
As soon as Rahab had finished spoken to them, the men went out of the city gate to pursue the two spies sent by Joshua.
Actually Rahab had the two spies in the flax which she had arranged on the attic of her house.
Rahab said to the two spies, “I know the Lord is with the people of Israel. When the Israelites come and attack our city, please remember how I had helped you and spare me, my father, my mother, my brothers, my sisters and all that we have.”
The two spies agreed that they will not kill Rahab and her family during the attack. So Rahab helped the spies to escape by letting out a scarlet cord.
The two spies said to Rahab,”When the Israelites come to attack Jericho, tie the scarlet cord on the window of your house as a mark so that we know and will pass over your house. Bring your father, mother, brothers, sisters and everything you have into the house.”
When the two spies returned to Joshua, they told Joshua everything.