And when she had a third son, she named him Shelah. At the time of Shelah's birth, they were living at Kezib.
When his oldest son, Er, grew up, Judah arranged his marriage to a young woman named Tamar.
But Er was a wicked man in the LORD's sight, so the LORD took his life.
Then Judah said to Er's brother Onan, "You must marry Tamar, as our law requires of the brother of a man who has died. Her first son from you will be your brother's heir."
But Onan was not willing to have a child who would not be his own heir. So whenever he had intercourse with Tamar, he spilled the semen on the ground to keep her from having a baby who would belong to his brother.
But the LORD considered it a wicked thing for Onan to deny a child to his dead brother. So the LORD took Onan's life, too.
Then Judah told Tamar, his daughter-in-law, not to marry again at that time but to return to her parents' home. She was to remain a widow until his youngest son, Shelah, was old enough to marry her. (But Judah didn't really intend to do this because he was afraid Shelah would also die, like his two brothers.) So Tamar went home to her parents.
In the course of time Judah's wife died. After the time of mourning was over, Judah and his friend Hirah the Adullamite went to Timnah to supervise the shearing of his sheep.
Someone told Tamar that her father-in-law had left for the sheep-shearing at Timnah.
Tamar was aware that Shelah had grown up, but they had not called her to come and marry him. So she changed out of her widow's clothing and covered herself with a veil to disguise herself. Then she sat beside the road at the entrance to the village of Enaim, which is on the way to Timnah.
Judah noticed her as he went by and thought she was a prostitute, since her face was veiled.