In the meantime, Joshua sent out two spies to scope out the land, especially Jericho. But the guards caught onto the spies, so they hid out a prostitute named Rahab’s house. Her house happened to be located in the city wall, and she took them up to her roof and hid them under sheaves of drying flax. Shortly thereafter, the guards came and drug Rahab before the king, who was all, hey, where are those Hebrew spies? They were totally seen going into your house. Rahab was all, yeah, those guys came by for some services, but how was I supposed to know they were Hebrews? They left my place right before sundown to make it out of town before the city gates closed. You guys should totally head out after them. I’ll show you the way they went.
So the guards went out on their wild goose chase and Rahab went back and got the spies down from the roof. She told them. that she was helping them because there was a prophecy about how the Hebrews were going to conquer all the land. That everyone had heard about the Pharaoh and the Red Sea, the defeat of the Amorites and Moabites. She was all, since I’ve helped you, you gotta promise that you’ll do right by me when you conquer Jericho. The spies promised, and told Rahab to tie a scarlet cord on her window and to gather all her family and friends in her house when she saw the Hebrews close in. Rahab told them that the guards were out after them, so they should hide close by in the hills and watch for their return, and then head back to their camp once the guards were back. Then she let them down the city wall on a rope out of her window.
When the spies made it back to Joshua, they told him everything, and Joshua took it as a further sign that they were meant to conquer the promised land.