Salvation through the blood of Jesus Christ is taught throughout the Old Testament. I'm starting to check out the places. I knew the story of the Israelites' escape from slavery in Egypt. The last plague brought on the Egyptians by God was the death of the first born. God, however, planned a way of escape for the Israelites' first borns. The family was to kill a lamb and put its blood on the doorposts and lintel of their homes. When the death angel passed over the land, he would not enter the homes where the blood had been applied.
When the Israelites were about to enter the Promised Land, they sent two spies across the Jordan River to the town of Jericho to spy out the land. They found out from Rahab, a prostitute, that the whole land was quaking with fear. They had heard how God had led the Israelites out of Egypt and then had helped them kill two powerful kings east of the Jordan, and now they were camped, ready to enter Canaan.
Rahab hid the spies while they were in Jericho. Then she made a bargain with them. If they would promise to spare her and her family when they conquered Jericho, she would help them get back to their camp safely. They agreed, but told her to hang a scarlet cord outside her window, which was in the wall of the city, so the soldiers would know which house was hers. Furthermore she must have all her family inside the house with her. Whoever was outside would die.
Rahab did as the spies said and when the Israelites conquered Jericho, she and her family were spared. So she became a part of God's family. Matthew 1:5 says that Rahab later married an Israelite named Salmon. Their son, Boaz later married Ruth who became the great-grandmother of King David, and of course from David's family eventually came Jesus Christ.
That is the rest of the story, but my point was really that the scarlet cord that showed the soldiers where Rahab and her family were, was the same as the blood over the doorposts in Egypt that showed the death angel where to pass over. Both are types of the saving blood of Jesus Christ given long before Jesus was born. I'd say God had a plan.