Genesis 45:5-8 NKJV
But now, do not therefore be grieved or angry with yourselves because you sold me here; for God sent me before you to preserve life. For these two years the famine has been in the land, and there are still five years in which there will be neither plowing nor harvesting. And God sent me before you to preserve a posterity for you in the earth, and to save your lives by a great deliverance. So now it was not you who 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.
NKJV: New King James Version