About that time Judah left his brothers and went to stay with a man named Hirah, who was from the town of Adullam.
There Judah met a young Canaanite woman whose father was named Shua. He married her,
and she bore him a son, whom he named Er.
She became pregnant again and bore another son and named him Onan.
Again she had a son and named him Shelah. Judah was at Achzib when the boy was born.
For his first son Er, Judah got a wife whose name was Tamar.
Er's conduct was evil, and it displeased the Lord, so the Lord killed him.
Then Judah said to Er's brother Onan, "Go and sleep with your brother's widow. Fulfill your obligation to her as her husband's brother, so that your brother may have descendants."
But Onan knew that the children would not belong to him, so when he had intercourse with his brother's widow, he let the semen spill on the ground, so that there would be no children for his brother.
What he did displeased the Lord, and the Lord killed him also.
Then Judah said to his daughter-in-law Tamar, "Return to your father's house and remain a widow until my son Shelah grows up." He said this because he was afraid that Shelah would be killed, as his brothers had been. So Tamar went back home.
After some time Judah's wife died. When he had finished the time of mourning, he and his friend Hirah of Adullam went to Timnah, where his sheep were being sheared.
Someone told Tamar that her father-in-law was going to Timnah to shear his sheep.