It was at this time that Y'hudah went off from his brothers and settled near a man named Hirah who was an 'Adulami.
There Y'hudah saw one of the daughters of a certain Kena'ani whose name was Shua, and he took her and slept with her.
She conceived and had a son, whom he named 'Er.
She conceived again and had a son, and she called him Onan.
Then she conceived yet again and had a son whom she called Shelah; he was in K'ziv when she gave birth to him.
Y'hudah took a wife for 'Er his firstborn, and her name was Tamar.
But 'Er, Y'hudah's firstborn, was evil from ADONAI's perspective, so ADONAI killed him.
Y'hudah said to Onan, "Go and sleep with your brother's wife - perform the duty of a husband's brother to her, and preserve your brother's line of descent."
However, Onan knew that the child would not count as his; so whenever he had intercourse with his brother's wife, he spilled the semen on the ground, so as not to give his brother offspring.
What he did was evil from ADONAI's perspective, so he killed him too.
Then Y'hudah said to Tamar his daughter-in-law, "Stay a widow in your father's house until my son Shelah grows up"; for he thought, "I don't want him to die too, like his brothers." So Tamar went and lived at home with her father.
In due time, Shua's daughter, the wife of Y'hudah, died. After Y'hudah had been comforted, he went up to be with his sheep-shearers in Timnah, he and his friend Hirah the 'Adulami.
Tamar was told, "Your father-in-law has gone up to Timnah to shear his sheep."
So she took off her widow's clothes, completely covered her face with her veil, and sat at the entrance to 'Einayim, which is on the way to Timnah. For she saw that Shelah had grown up, but she still was not being given to him as his wife.
When Y'hudah saw her, he thought she was a prostitute, because she had covered her face.
So he went over to her where she was sitting and said, not realizing that she was his daughter-in-law, "Come, let me sleep with you." She answered, "What will you pay to sleep with me?"
He said, "I will send you a kid from the flock of goats." She said, "Will you also give me something as a guarantee until you send it"
He answered, "What should I give you as a guarantee?" She said, "Your seal, with its cord, and the staff you're carrying in your hand." So he gave them to her, then went and slept with her; and she conceived by him.
She got up and went away, took off her veil and put on her widow's clothes.
Y'hudah sent the kid with his friend the 'Adulami to receive the guarantee items back from the woman, but he couldn't find her.
He asked the people near where she had been, "Where is the prostitute who was on the road at 'Einayim?" But they answered,"There hasn't been any prostitute here."
So he returned to Y'hudah and said, "I couldn't find her; also the people there said, 'There hasn't been any prostitute here.'"
Y'hudah said, "All right, let her keep the things, so that we won't be publicly shamed. I sent the kid, but you didn't find her."
About three months later Y'hudah was told, "Tamar your daughter-in-law has been acting like a whore; moreover, she is pregnant as a result of her prostitution."Y'hudah said, "Bring her out, and let her be burned alive!"
When she was brought out, she sent this message to her father-in-law: "I am pregnant by the man to whom these things belong. Determine, I beg you, whose these are - the signet, the cords and the staff."
Then Y'hudah acknowledged owning them. He said, "She is more righteous than I, because I didn't let her become the wife of my son Shelah." And he never slept with her again.
When she went into labor, it became evident that she was going to have twins.
As she was in labor, one of them put out his hand; and the midwife took his hand and tied a scarlet thread on it, saying, "This one came out first."
But then he withdrew his hand, and his brother came out; so she said, "How did you manage to break out first?"Therefore he was named Peretz [breaking out].
Then out came his brother, with the scarlet thread on his hand, and he was given the name Zerach [scarlet].