The haftarah for this Shabbat relates how Joshua sent two spies to investigate conditions in the land of Israel. The narrative parallels the Torah selection of the twelve spies.
The two spies find refuge in the home of Rahab the prostitute. Rahab lies to the King of Jericho in order to protect the spies. The spies escape via the roof. Rahab asks the spies to save her and her family when the Israelites conquer the city. Rahab expresses her belief that the G-d of Israel has delivered Jericho into the hands of the Israelites. In Jewish lore, Rahab is portrayed as a righteous convert to Judaism. The spies consent to Rahab's request to save her family. The scarlet thread will be a sign to point out Rahab's household.
The spies return to Joshua. They assert that the Israelites certainly will conquer the city of Jericho. The faith of the spies of the generation of conquest contrast markedly to the insecurity of the generation of the wilderness.