Judah, the guy that sold his brother into slavery, moved in with a guy living in Adullam named Hirah. He met this girl there, the daughter of Shua, and they got married. They had three sons, Er, Onan and Shelah.
So when Er got older (presumably), his father wed him to a nice girl named Tamar. But Er was 'wicked in the lord's sight; so the lord put him to death.' Yikes, that was quick. Wonder what he did.
Well, Judah had spent a lot on Tamar's dowry, I guess, so he figured he had to get SOMETHING for it. So he told his next oldest son, Onan, to go ahead and try to impregnate his sister-in-law.
This didn't seem right to Onan (how can we not sympathize with this guy?) so whenever his dad told him to go 'get her done' Onan spilled his semen on the ground instead. He was the first person in history to have committed Onanism. Hee hee.
Apparently even though Judah didn't know anything was amiss, god saw it and decided this was wicked, so he put Onan to death also.
At this point Judah wondered if his last son, Shelah, would also be put to death mysteriously. God is kinda like the mafia in this story.
So Judah told Tamar to live as a widow with her father, just until Shelah grew up and could. . . finish the merger. He suspected Shelah would die anyway, god seemed to have an itchy trigger finger lately.
Then Judah's wife died (still unnamed) and Judah mourned. After that, he went to go shear his sheep.
Tamar heard Judah was going to be in Timnah, shearing sheep, so she dressed like a prostitute and sat down on the road where Judah would be passing. She was pissed because Shelah had grown up but she wasn't his wife.
She was wearing a veil, which was how she looked like a prostitute, so when Judah saw her on the road he figured. . . you know. . .
She asked what price he would pay for her services, and he said, oh, I'll send you a young goat. She wanted some kind of pledge--apparently she wasn't an idiot. He agreed to give her his seal and its cord, and the staff in his hand. A lot of these descriptors seem sexual to me, but maybe it's the context.
Anyway, they agreed to it, and then had sex. She got pregnant.
So he wasn't cheating on his wife, because she had died. I'm glad the author made that clear.
Tamar went home and put her widow's clothes back on.
When Judah sent his friend with the goat to the place by the road where the 'prostitute' had been, there was no one to be found. When the guy asked around no one remembered there being anybody hooking in the area. Doh!
When Judah learned of this he kept it on the down-low. If people found out about the deal he'd made, he'd be a laughingstock!
But three months later Judah was told that his daughter-in-law was guilty of prostitution, and pregnant! Well, bring her out and BURN HER TO DEATH! was his reasonable reply.
But before Tamar was brought out, she sent the seal and cord and staff to her father-in-law with the message 'I'm pregnant by the owner of these.'
Check. Fucking. Mate.
Judah decided that Tamar was more righteous than he, since she only turned that trick because he wouldn't fulfill his promise to her.
Tamar gave birth to two boys. The first hand that popped out was tied with a scarlet thread, but the first child to come out was the other one, which surprised everyone. The stories in the bible about women giving birth to twins always creep me out. The sons' names were Perez and Zerah.