Rahab the prostitute is another example. She was shown to be right with God by her actions when she hid those messengers and sent them safely away by a different road.
“Which of the two obeyed his father?” They replied, “The first.” Then Jesus explained his meaning: “I tell you the truth, corrupt tax collectors and prostitutes will get into the Kingdom of God before you do.
It was by faith that Rahab the prostitute was not destroyed with the people in her city who refused to obey God. For she had given a friendly welcome to the spies.
Now someone may argue, “Some people have faith; others have good deeds.” But I say, “How can you show me your faith if you don’t have good deeds? I will show you my faith by my good deeds.”
Then Joshua secretly sent out two spies from the Israelite camp at Acacia Grove. He instructed them, “Scout out the land on the other side of the Jordan River, especially around Jericho.” So the two men set out and came to the house of a prostitute named Rahab and stayed there that night.
“Escape to the hill country,” she told them. “Hide there for three days from the men searching for you. Then, when they have returned, you can go on your way.”
Jericho and everything in it must be completely destroyed as an offering to the Lord. Only Rahab the prostitute and the others in her house will be spared, for she protected our spies.