'Er died for his wickedness, and left no children . It was of their culture that if a man died, leaving no children, his brother would have to produce children through the dead man's wife for him. 'Onan refused to do this, and died because God saw this as wicked . At this time, Shelah was too young to fulfill his duties as a brother, so Yehudah deceptively told his daughter-in-law, Tamar, to live as a widow in her father's house until Shelah grew up. He thought Shelah may die too, but didn't want that to happen.
After a while, Shelah's mother died. Other events took place, including more deception, and Shelah got twin brothers . They were named Perez and Zerah.
Shelah became the ancestor of the Shelanite clan of the tribe of Judah . His sons were 'Er (likely named after his uncle who had died prior to his birth), La'adah, Yokim, and others .