Genesis 45:5-8 AMP
Now do not be distressed or angry with yourselves because you sold me here, for God sent me ahead of you to save life and preserve our family. For the famine has been in the land these two years, and there are still five more years in which there will be no plowing and harvesting. God sent me [to Egypt] ahead of you to preserve for you a remnant on the earth, and to keep you alive by a great escape. 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 household and ruler over all the land of Egypt.