Genesis 38
1And it came to pass at that time, that Judah went down from his brethren, and turned in to a certain Adullamite, whose name was Hirah.
2And Judah saw there a daughter of a certain Canaanite, whose name was Shuah; and he took her, and went in unto her.
3And she conceived, and bare a son; and he called his name Er.
4And she conceived again, and bare a son; and she called his name Onan.
5And she yet again conceived, and bare a son; and called his name Shelah: and he was at Chezib, when she bare him.
6And Judah took a wife for Er his firstborn, whose name was Tamar.
7And Er, Judah’s firstborn, was wicked in the sight of the LORD; and the LORD slew him.
8And Judah said unto Onan, Go in unto thy brother’s wife, and marry her, and raise up seed to thy brother.
9And Onan knew that the seed should not be his; and it came to pass, when he went in unto his brother’s wife, that he spilled it on the ground, lest that he should give seed to his brother.
10And the thing which he did displeased the LORD: wherefore he slew him also.
12And in process of time the daughter of Shuah Judah’s wife died; and Judah was comforted, and went up unto his sheepshearers to Timnath, he and his friend Hirah the Adullamite.
24And it came to pass about three months after, that it was told Judah, saying, Tamar thy daughter in law hath played the harlot; and also, behold, she is with child by whoredom. And Judah said, Bring her forth, and let her be burnt. 25When she was brought forth, she sent to her father in law, saying, By the man, whose these are, am I with child: and she said, Discern, I pray thee, whose are these, the signet, and bracelets, and staff. 26And Judah acknowledged them, and said, She hath been more righteous than I; because that I gave her not to Shelah my son. And he knew her again no more.
27And it came to pass in the time of her travail, that, behold, twins were in her womb.
28And it came to pass, when she travailed, that the one put out his hand: and the midwife took and bound upon his hand a scarlet thread, saying, This came out first.
29And it came to pass, as he drew back his hand, that, behold, his brother came out: and she said, How hast thou broken forth? this breach be upon thee: therefore his name was called Pharez.