It had been prophesied that our Lord Jesus Christ would descend from the line of Judah. When Judah was still very young he entered into a marriage with a Canaanite- woman. By her he had three sons by the names of Er, Onan, and Shelah. Judah found a wife for his first born son, Er, by the name of Tamar. However, Er turned out to be wicked in the sight of the Lord, and the Lord killed him before his wife was able to bear a son. Therefore, the next son, Onan went and took her as his wife, in order that she might conceive and bear a child to preserve the name of his brother. But Onan knew the child would not be his heir, so he refused to have a child unto his brother’s name. This displeased the Lord: therefore He killed him also.
Now Shelah was Judahs only son left. Judah feared that he might lose him as well, so he told Tamar to remain a widow until Shelah was old enough to take her as his wife.
After some time, Shelah grew up, but it was obvious to Tamar that her father-in-law had no intentions of giving his son to her. Therefore, when Tamar heard that Judah would be gone to sheer his sheep, she decided to cover herself with a veil, pretending to be a prostitute in order that she might seduce Judah on his way home--- thinking, that if the son would not, the father might raise up a child through her to carry on the name of her first husband. For payment he gave her a signet ring, later to be retrieved with the payment of a goat. However, later when Judah sent someone to send the goat and retrieve his belongings, the woman could not be found.
A while later, Judah found out that Tamar was pregnant. Since she was a widow and unmarried he assumed that she acted immorally. So Judah said, “Bring her out and let her be burned.” When she came out, she said, “By the man to whom these belong, I am with child. Please determine who’s signet ring this is.” Judah confessed that they were his, and said, “She has been more righteous than I.”
Now when it came time that Tamar would give birth, she discovered that twins were in her womb. Like Jacob and Esau, they both struggled for the birthright, and Perez obtained it, the other was named Zerah, but it was Perez from which Christ descended.
Now Rahab is introduced as a prostitute. She was an immoral women living in Jericho, a pagan culture that was devoted entirely to everything God hates. Jericho was part of the Amorite Kingdom. The Amorite culture had been so completely corrupt for so long, that God himself had condemned them and ordered the Israelites to wipe them from the face of the earth.
Rahab was enslaved and in bondage to her own sin, and held on to a terribly evil society that was already under God’s condemnation. They were marked out for eternal destruction. But divine grace redeemed her, and she repented of her sins. Now the Lord was ready to use her in a mighty way.
During this same time, Joshua sent two spies into Jericho to view the land, in order to plan out his attack on them. As they entered the land, the providence of God directed them to the house of Rahab. It was by faith that Rahab received these men with peace, and she knew both where they came from and what their business was, saying, “I know that the Lord has given you this land. The terror of you has fallen on us, and all the inhabitants of the land are fainthearted because of you.”
She hid the men upon the roof of her house, so that If the officers would come searching for them, they would not be discovered.
When the king did find out that there were Israelites searching the country they went directly to Rahab’s telling her to bring out the men who have come to her house. But Rahab told them that she never allowed them to enter, and encouraged them to continue searching else where, so they might catch them in time.
Because Rahab had protected the Israelite men, they had agreed to protect her and her family in return. Rahab was later accepted into the Israelite community. She became the wife of Salmon, and then became one of the ancestors of Christ.
Both Tamar and Rahab were originally Canaanites. Tamar had already embraced the true religion, and believed the promise made to Abraham—that the Messiah would descend from the line of Judah. Rahab lived in Jericho, a thoroughly pagan and depraved culture which God had already condemned and marked out for eternal destruction.
Tamar was raised in a Jewish culture and had a full knowledge of God, while Rahab was raised in a pagan culture and had no knowledge of God. Tamar, even through her knowledge of God, lacked faith and took things into her own hands and deceived her father-in-law. The Lord had revealed Himself to Rahab and entered her heart in a society where knowledge of Him was rare, causing her to act purely out of faith.
Both women were deceptive. Tamar’s deception was selfish. Knowing that the Messiah would descend from the line of Judah, she had a great desire to have a child through one of Judah’s sons, but when that was no longer an option, she ended up not having faith and trusting that the Lord would carry out His promise; causing her to commit a very sinful act.
Rahab, though she clearly betrayed her country by protecting the enemies of it, and helping those that were planning the destruction of Jericho. She put her own life in jeopardy by protecting these men. However, her actions were of faith and not based of her own self benefits. And the Lord blessed her greatly for that.
Tamar feared her own position over God, and was willing to deceive her father-in-law in order to secure her position and identity. She probably feared that she would lose her position and importance in her community by not having a child—therefore was willing to sin in order to secure that position. Rahab feared God over her country, and was willing to deceive her country in order to honor God.
These are two examples of Gods grace and mercy on two sinful people to accomplish His purpose of a Savior, rather than raising up noble kings and queens to usher in our Lord and Savior, Jesus Christ to a fallen world.