He explains to his brothers, "You intended me harm, but God intended good, He sent me to provide life to the whole land."
A slightly different more literal translation of Yosef's words is rendered: "You judged me for my evil qualities, and God judged me by my good qualities."
It was this judgement according to his potential for Good, this kindness from HaShem, through which the entire budding nation of Israel received their livelihood.
This reading also brings clarity to the teachings of the midrashim regarding the redemption from Egypt, especially the splitting of the sea.
We are taught that it was in Yosef's merit that the sea split. We say in Hallel every Rosh Hodesh, "the sea saw and retreated." The Rabbis teach, what did the seas see that made them retreat? They saw the bones of Yosef which the Israelites brought with them out of Egypt -- from where do we learn this out? The same word that means "retreated" (וינס) is the word that describes how Yosef fled from Potiphar's wife. So in Hallel the passuk has a double entendre: The sea saw Yosef (who fled) and retreated.
But why did the sea split for Yosef?
We learn that at the moment of the splitting of the sea, the heavenly angels petitioned God, "They (the Israelites) are idolators, and they (the Egyptians) are idolators? Why will you save one and kill off the other?" It was a serious dilemma, God is Just, where is the basis to justify this apparent discrimination?
From our new understanding of the end of sefer Bereishith, we can better understand the splitting of the sea:
Bnei Yisrael carried Yosef's coffin with them into the sea, saying "Judge us based on our potential for good, not based on our failings. That's the lesson we learned from Yosef. You sent us to Egypt to live and not to die."