Joseph was the son of Jacob and his favored wife Rachel. Jacob therefore showed favoritism toward Joseph, which made his brothers despise him. Out of jealousy, they sold him into slavery. Joseph was taken to Egypt, where he was purchased by a royal official. Joseph was imprisoned on false charges but was released after interpreting the dreams of Pharaoh. Because the dreams had predicted seven years of famine, Pharaoh put Joseph in charge of preparing for the famine. During the famine Joseph’s family unknowingly came to him for help, and Joseph forgave his brothers and rescued his family. Through Joseph, God used evil to work out his good purposes, foreshadowing the time when he would bring the supreme good of eternal salvation out of the wicked actions of those who crucified Jesus. (Genesis 50:19–20)