Yaakov (Jacob) settles in Chevron (Hebron) with his twelve sons. His favorite is 17-year-old Yosef (Joseph), whose brothers are jealous of the preferential treatment he receives from his father, such as a precious many-colored coat that Yaakov makes for Yosef. Yosef relates to his brothers two dreams he has which foretell that he is destined to rule over them, increasing their envy and hatred towards him.
Shimon and Levi plot to kill him, but Reuven suggests that they throw him into a pit instead, intending to come back later and save him. While Yosef is in the pit, Yehudah has him sold to a band of passing Yishmaelites. The brothers dip Yosef's special coat in the blood of a goat and show it to their father, leading him to believe that his most beloved son was devoured by a wild beast.
Yehudah marries and has three children. The eldest, Er, dies young and childless, and his wife Tamar is given in levirate marriage to the second son, Onan. Onan sins by spilling his seed and he, too, meets an early death. Yehudah is reluctant to have his third son marry her. Determined to have a child from Yehudah's family, Tamar disguises herself as a prostitute and seduces Yehudah himself. Yehudah hears that his daughter-in-law has become pregnant and orders her executed for harlotry, but when Tamar produces some personal effects he left with her as a pledge for payment, he publicly admits that he is the father. Tamar gives birth to twin sons, Peretz (an ancestor of Dovid HaMelech [King David]) and Zerach.
Yosef is taken to Egypt and sold to Potiphar, the minister in charge of Pharaoh's slaughterhouses. God blesses everything he does, and soon he is made overseer of all his master's property. Potiphar's wife desires the handsome and charismatic lad; when Yosef rejects her advances, she tells her husband that the Hebrew slave tried to force himself on her and has him thrown in prison. Yosef gains the trust and admiration of his jailers, who appoint him to a position of authority in the prison administration.
In prison, Yosef meets Pharaoh's chief butler and chief baker, both incarcerated for offending their royal master. Both have disturbing dreams, which Yosef interprets; in three days, he tells them, the butler will be released and the baker hanged. Yosef asks the butler to intercede on his behalf with Pharaoh. Yosef's predictions are fulfilled, but the butler forgets all about Yosef and does nothing for him.