The second chapter of the book of Joshua narrates the story of Rahab and the Israelite spies at Jericho. The ancient city stood on the west bank of the Jordan and was one of the main obstacles to the Israelite conquest and settlement of Canaan. Its geographical importance is seen in the city’s central role not only in this chapter but also in subsequent parts of the conquest narrative (for example, Joshua 5:13–6:27).
From a strategic military point of view, the need to send spies into the land of Canaan before launching the conquest is self-evident. From a narrative perspective, this activity recalls Moses’s dispatch of spies into the land of Canaan previously in Numbers 13, thereby reinforcing Joshua’s association with Moses as a literary figure.
Not much is known about Rahab, the heroine of the chapter who saves the Israelite scouts. She was a harlot, or prostitute (verse 1; Hebrew zonah) and, evidently, a Canaanite (although her precise ethnic background is unknown). In Matthew’s genealogy she is accounted as one of Jesus’s ancestors (see Matthew 1:5). Narratively, the story is infused with the powerful theme of the least likely person—a woman, a prostitute on the margins of society—playing a salvific role for herself and her family (compare Hebrews 11:31).
Rahab’s motivation for assisting the Israelites is given at Joshua 2:8–13. Word of Israel’s miraculous deliverance from the Egyptians had by that time reached some of the inhabitants of Canaan, including, it would seem, the people of Jericho. Rahab was especially worried about the looming military devastation, as she was aware of Israel’s victories over the Amorites. Jehovah’s reputation among some of the Canaanites as a divine warrior who triumphed over the gods of the nations was well earned: “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” (verse 11).
In exchange for helping the spies escape, Rahab and her family were promised protection by the Israelites (verse 14; compare 6:17, 22–23). The spies used Rahab as in informant in their subsequent report to Joshua (2:22–24), thus securing the Israelites the confidence they needed at the outset of their assault: “Truly the Lord hath delivered into our hands all the land; for even all the inhabitants of the country do faint because of us” (verse 24).
 Some medieval Jewish commentators interpreted Rahab’s profession as deriving from the root zwn (“innkeeper”) instead of znh (“harlot, prostitute”). This is also how her occupation was interpreted in the Aramaic Targum of this verse, which calls Rahab an “innkeeper woman.” The ordinary and straightforward reading of the Hebrew text is that she was a prostitute.
 See Joshua 2:10; compare Numbers 21:21–35; Deuteronomy 2:26–3:11.