Genesis 45: 5-7

And now, do not be distressed and do not be angry with yourselves for selling me here, because it was to save lives that God sent me ahead of you. For two years now there has been famine in the land, and for the next five years there will be no plowing and reaping. But God sent me ahead of you to preserve for you a remnant on earth and to save your lives by a great deliverance.