Joshua 1: 1-3, Joshua 2:1-7,15-18, 21, Joshua 6: 1-25 (New Revised Standard Version)
... The Lord spoke to Joshua son of Nun... saying, "... Now proceed to cross the Jordan [River], you and all this people, into the land that I am giving to them, the Israelites. Every place that the sole of your foot will tread upon I have given to you... .
Then Joshua son of Nun sent two men secretly from Shittum as spies, saying, "Go, view the land, especially Jericho." So they went, and entered the house of a woman [Note: the biblical text uses the word prostitute here] whose name was Rahab, and spent the night there. The king of Jericho was told, "Some Israelites have come here tonight to search out the land." Then the king of Jericho sent orders to Rahab, "Bring out the men who have come to you, who entered your house, for they have come only to search out the whole land." But the woman took the two men and hid them. Then she said, "True, the men did come to me, but I did not know where they came from. And when it was time to close the gate at dark, the men went out. Where the men went I do not know. Pursue them quickly, for you can overtake them." She had, however, brought them up to the roof and hidden them with the stalks of flax she had lain out on the roof. So the men pursued them on the way to Jordan as far as the fords. As soon as the pursuers had gone out, the gate was shut...
Then she let them down by a rope through the window, for her house was on the outer side of the city wall and she resided within the wall itself. She said to them, "Go toward the hill country, so that the pursuers may not come upon you. Hide yourselves there three days, until the pursuers have returned; then afterward you may go your way." The men said to her, "... tie this crimson cord in the window through which you let us down ... and gather into your house your father and mother, your brothers, and all your family... " She said, "According to your words, so be it." She sent them away and they departed. Then she tied a crimson cord in the window.
Now Jericho was shut up inside and out because of the Israelites; no one came out and no one went in. The Lord said to Joshua,"See, I have handed Jericho over to you, along with its king and soldiers. You shall march around the city, all the warriors circling the city once. Thus you shall do for six days, with seven priests bearing seven trumpets of rams' horns before the ark. On the seventh day you shall march around the city seven times, the priests blowing the trumpets. When they make a long blast with the ram's horn, as soon as you shall hear the sound of the trumpet, then all the people shall shout with a great shout; and the wall of the city will fall down flat, and all the people shall charge straight ahead." So Joshua son of Nun summoned the priests and said to them, "Take up the Ark of the Covenant, and have seven priests carry seven trumpets of rams' horns in front of the ark of the Lord." To the people he said, "Go forward and march around the city; have the armed men pass on before the ark of the Lord."
As Joshua had commanded the people, the seven priests carrying the seven trumpets of rams' horns before the Lord went forward, blowing the trumpets, with the ark of the covenant of the Lord following them. And the armed men went before the priests who blew the trumpets; the rear guard came after the ark, while the trumpets blew continually. To the people Joshua gave this command: "You shall not shout or let your voice be heard, nor shall you utter a word, until the day I tell you to shout. Then you shall shout." So the ark of the Lord went around the city, circling it once; and they came into the camp, and spent the night in the camp.
Then Joshua rose early in the morning, and the priests took up the ark of the Lord. The seven priests carrying the seven trumpets of rams' horns before the ark of the Lord passed on, blowing the trumpets continually. The armed men went before them, and the rear guard came after the ark of the Lord, while the trumpets blew continually. On the second day they marched around the city once and then returned to the camp. They did this for six days.
On the seventh day they rose early, at dawn, and marched around the city in the same manner seven times. It was only on that day that they marched around the city seven times. And at the seventh time, when the priests had blown the trumpets, Joshua said to the people, "Shout! For the Lord has given you the city. The city and all that is in it shall be devoted to the Lord for destruction. Only Rahab the prostitute [woman] and all who are with her in her house shall live because she hid the messengers we sent. As for you, keep away from the things devoted to destruction, so as not to covet and take any of the devoted things and make the camp of Israel an object for destruction, bringing trouble upon it. But all silver and gold, and vessels of bronze and iron, are sacred to the Lord; they shall go into the treasury of the Lord." So the people shouted, and the trumpets were blown. As soon as the people heard the sound of the trumpets, they raised a great shout, and the wall fell down flat; so the people charged straight ahead into the city and captured it. Then they devoted to destruction by the edge of the sword all in the city, both men and women, young and old, oxen, sheep, and donkeys.
Joshua said to the two men who had spied out the land, "Go into the prostitute's [woman's] house, and bring the woman out of it and all who belong to her, as you swore to her." So the young men who had been spies went in and brought Rahab out, along with her father, her mother, her brothers, and all who belonged to her- they brought all her kindred out- and set them outside the camp of Israel. They burned down the city, and everything in it; only the silver and gold, and the vessels of bronze and iron, they put into the treasury of the house of the Lord. But Rahab..., with all her family and all who belonged to her, Joshua spared. Her family has lived in Jericho ever since. For she hid the messengers whom Joshua sent to spy out Israel.