Before Israel’s battle against the city of Jericho, Joshua sent two spies into the city to investigate (Joshua 2). When these two spies’ presence was discovered, the spies hid in Rahab the harlot’s house to avoid capture.
The spies found refuge in the house of a prostitute—they were people of God, the house of a harlot was probably a good place to avoid detection—a couple of travelers entering such a house would probably not arouse much suspicion. The spies, seeking anonymity, figured a house of prostitution would be a good place to find it. Also, Rahab’s house was situated on the city wall (Joshua 2:15), providing an escape route. As it turned out, the spies’ choice of a hiding place was God-ordained.
Rahab’s assistance to these spies was of tremendous importance. She hid the spies on her roof, and, when the king’s guards came to her house, she sent the guards in a different direction. Thus, she protected the lives of the two Israelite spies. In her conversation with the spies, Rahab declared her faith, saying, “And as soon as we had heard these things, our hearts did melt, neither did there remain any more courage in any man, because of you: for the Lord your God, he is God in heaven above, and in earth beneath.” (Joshua 2:11).
As a result of Rahab’s faith and actions, the two men promised to protect Rahab and her family when the Israelites returned. They told her, “And the men answered her, Our life for yours, if ye utter not this our business. And it shall be, when the Lord hath given us the land, that we will deal kindly and truly with thee.” Joshua 2:19
At the battle of Jericho, the walls of the city fell down, and the people of Jericho were defeated. Rahab’s family, however, was spared: “And Joshua saved Rahab the harlot alive, and her father's household, and all that she had; and she dwelleth in Israel even unto this day; because she hid the messengers, which Joshua sent to spy out Jericho.”Joshua 6:25
Rahab’s name would later be mentioned in three important places in the New Testament. First, Matthew 1:5 mentions her as the mother of Boaz, making her the great-great-grandmother of King David. More importantly, Rahab was a direct ancestor of Jesus the Christ.
Rahab is mentioned in Hebrews 11. “By faith the harlot Rahab perished not with them that believed not, when she had received the spies with peace.” Hebrews 11:31
Rahab’s actions are mentioned in James 2 as an example of true, living faith: “Likewise also was not Rahab the harlot justified by works, when she had received the messengers, and had sent them out another way? For as the body without the spirit is dead, so faith without works is dead also.” James 2:25–26
Her actions saved lives and revealed her heart of faith. Despite her background, her faith and actions worked together to reveal her as a woman who believed in God.