After leading the Israelites through the desert for forty years Moses died. God chose Joshua as the new leader of his people.
God told Joshua to get the people of Israel ready to cross the river Jordan so they could enter the land he had promised them. Before Joshua entered the land of Canaan he decided to send out two spies to the city of Jericho to look at the land God had given them.
The men spent the night with a woman called Rahab who lived in a house that was built into the wall, but the King of Jericho heard about the spies and sent soldiers to arrest them.
When Rahab heard that the king was sending soldiers to arrest the spies. She hid the men on her roof under a pile of flax. When the soldiers asked her about the men she said that they had left.
The Spies spent the night on the roof top. In the morning Rahab went and spoke to the men. She told them that all her people were afraid and that they had heard that God was going to give the land of Canaan to the Israelites.
She asked the spies to promise that they would protect her and her family when the Israelites took the land of Canaan.
The men promised her that she would be safe if she told no one what they had been doing. She let the spies down from a window in her house in the city wall. The men were able to escape and to report back to Joshua.
The spies told Rahab to tie a red cord to her window, so that when they captured the city they would know which house was hers and she and her family would be safe.