After his brothers sold Joseph into slavery; things got even worse.
Joseph was put in jail. Gen 39:20
Throughout his difficulties, Joseph never lost faith in God. Even in jail, Joseph let God use Joseph as God’s instrument in this world. Specifically, Joseph let God use him to interpret dreams.
And then, one day …
Pharaoh … had Joseph summoned, … Pharaoh then said to [Joseph]: “I had certain dreams that no one can interpret. But I hear … you can …” “It is not I,” Joseph replied to Pharaoh, “but God who will give Pharaoh the right answer.” Gen 41:14-21
Then Pharaoh said to Joseph: “In my dream, I was standing on the bank of the Nile, when up from the Nile came seven cows, fat and well-formed; … Behind them came seven other cows, scrawny … and gaunt. … The gaunt, ugly cows ate up the first seven fat cows. But when they had consumed them, no one could tell that they had done so, because they looked as ugly as before. Gen 41:14-21
In another dream I saw seven ears of grain, fat and healthy, growing on a single stalk. Behind them sprouted seven ears of grain, shriveled and thin and blasted by the east wind; and the seven thin ears swallowed up the seven healthy ears. …” Gen 41:22-24
Joseph said to Pharaoh: “Both of Pharaoh’s dreams have the same meaning. God has thus foretold to Pharaoh what he is about to do. Gen 41:25
Seven years of great abundance are now coming throughout the land of Egypt; but these will be followed by seven years of famine, … Gen 41:29-30
That Pharaoh had the same dream twice means that the matter has been reaffirmed by God and that God will soon bring it about. Gen 41:32
“Therefore, let Pharaoh seek out a wise and discerning man and put him in charge of the land of Egypt. Gen 41:29:33
“Could we find another like [Joseph],” Pharaoh asked his officials, “a man so endowed with the spirit of God?” … Herewith,” Pharaoh told Joseph, “I place you in charge of the whole land of Egypt.” Gen 41:38-41
During the seven years of plenty, … the land produced abundant crops, Gen 41:47
[Joseph gathered] … the [surplus] … and stored it… Gen 41:48
Joseph garnered grain in quantities like the sands of the sea, so vast that at last he stopped measuring it, for it was beyond measure. Gen 41:49
When the seven years of abundance enjoyed by the land of Egypt came to an end, the seven years of famine set in, just as Joseph had predicted. Although there was famine in all the other countries, food was available throughout the land of Egypt. Gen 41:53-54
The famine extended to Canaan where …
… [Jacob] said to his sons: “… I hear,… that rations of grain are available in Egypt. Go down there and buy some for us, …” Gen 42:1-2
Joseph’s brothers went to Egypt. They had lots of adventures. Eventually …
[Joseph] said (to his brothers): “I am your brother Joseph, whom you once sold into Egypt. But now do not be distressed, and do not reproach yourselves for having sold me here. It was really for the sake of saving lives that God sent me here ahead of you. Gen 45:4-5
Joseph accepted his sufferings and his triumphs as all part of God’s plan.
… Jacob and all his descendants migrated to Egypt. Gen 46:6
… seventy persons in all. Gen 46:27
After the famine ended, the Israelites stayed in Egypt. After all, why leave? Their brother ran the country!
When Jacob died the Israelites went to Canaan, buried Jacob there, and then returned to continue living in Egypt. Gen 50:12-14
Joseph died at the age of a hundred and ten. Gen 50:26
Having lived in Egypt many years, the Israelites stayed in Egypt even after Joseph died.