It was taught: Rabbi Yose the Galilean says: Since Scripture weighs the deeds of the Land of Israel against the deeds of the land of Egypt, as it says, "like the deeds of the land of Egypt" and so forth (Leviticus 18:3). Why did the Canaanites merit to dwell upon their land for forty-seven years, as it says, "and Hebron was built seven years before Zoan of Egypt" (Numbers 13:22)? Because they honored Abraham our father, for they said to him, "You are a prince of God in our midst" (Genesis 23:6); for this they merited to dwell upon their land for forty-seven years. Rabban Shimon ben Gamliel says in the name of Rabbi Yehudah ben Lakish: behold it says, "the great man among the Anakim, and the land had rest from war" (Joshua 14:15). The sons of Canaan, who honored Abraham our father, merited that the land should be quiet for them. "The great man among the Anakim, and the land had rest" — what has the one matter to do with the other? This teaches that the war did not rest from the Canaanites except by the merit of Abraham, because they treated him with honor and said to him, "You are a prince of God in our midst; my lord, hear me" (Genesis 23:6,11). And further, a remnant survived among them, and from them some went to Africa. And if, in the case of the Canaanites, because they honored him his merit stood by them even though they did not walk in his ways and did not love the Omnipresent, then his sons who walk in his ways and perform acts of righteousness and loving-kindness — how much more so!
The Canaanites Who Honored Abraham and Held Their Land
Yalkut Shimoni on Nach 23:6
תניא רבי יוסי הגלילי אומר אחר שהכתוב שוקל מעשה ארץ ישראל למעשה ארץ מצרים שנאמר כמעשה ארץ מצרים וגו'. למה זכו כנעניים שישבו על ארצם מ"ז שנה שנאמר וחברון שבע שנים נבנתה לפני צוען מצרים, מפני שכבדו את אברהם אבינו שאמרו לו נשיא אלהים אתה בתוכנו זכו שישבו על ארצם מ"ז שנה, רבן שמעון בן גמליאל אומר משום ר' יהודה בן לקיש הרי הוא אומר האדם הגדול בענקים והארץ שקטה ממלחמה, בני כנען שכבדו את אברהם אבינו זכו שתשקוט הארץ עליהם. האדם הגדול בענקים והארץ שקטה מה ענין זה לזה מלמד שלא שקטה המלחמה מן הכנעניים אלא בזכות אברהם שנהגו בו כבוד ואמררו לו נשיא אלהים אתה בתוכנו אדוני שמעני. ועוד נותרה בהם פליטה ומהם הלכו לאפריקי. ומה אם כנעניים על שכבדו אותו עמדה להם זכותו אע"פ שלא הלכו בדרכיו ולא אהבו את המקום בניו שהולכים בדרכיו ועושים צדקות וגמילות חסדים על אחת כמה וכמה: