Genesis 45:5-8

5 Now therefore be not grieved, nor angry with yourselves, that you sold me here: for God did send me before you to preserve life.

6 For these two years has the famine been in the land: and yet there are five years, in the which there shall neither be ripening nor harvest.

7 And God sent me before you to preserve you a posterity in the earth, and to save your lives by a great deliverance.

8 So now it was not you that sent me here, but God: and he has made me a father to Pharaoh, and lord of all his house, and a ruler throughout all the land of Egypt.