Joseph's brothers did not take kindly to him, but even more so after he has a dream in which they bow down to him. The brothers conspire againt Joseph, but Reuben convinces them not to kill Joseph, but rather to trap Joseph in a well, and sell him to Ishmaelites, who sell Joseph to Potipher, a functionary of the pharaoh. The brothers convince Jacob that Joseph had been killed by an animal.
Judah marries a Canaanite woman and has three sons. The first, Er, marries Tamar, but the Lord puts him to death because he is wicked. Judah instructs his next son, Onan, to take Tamar as his wife, but he refuses to consummate the marriage, and leaves Tamar in a precarious state in relation to the family as a childless daughter-in-law. God also kills Onan for this act. Judah promises Tamar Shelah when he grows up, but when this does not happen, she pretends to be a prostitute and conceives twins by Shelah. Tamar will be one of the women mentioned in the genealogy of Christ.