Judah has 3 sons: Er, Onan, and Shelah. Er gets married and dies. Onan takes his wife and displeases God and dies. Judah then fears for his son Shelah's life and prevents him from marrying Tamar. Eventually, Tamar tricks Judah into giving her the Heir she deserves.