Deuteronomy 9:5

It is not because of your righteousness or uprightness of heart that you are going in to possess their land, but it is because of their wickedness that the Lord your God is driving out these nations before you, to keep the promise He swore to your fathers, to Abraham, Isaac, and Jacob.
BSB · Berean Standard Bible
Not for thy righteousness, or for the uprightness of thine heart, dost thou go to possess their land: but for the wickedness of these nations the Lord thy God doth drive them out from before thee, and that he may perform the word which the Lord sware unto thy fathers, Abraham, Isaac, and Jacob.
KJV · King James Version
Not for your righteousness or for the uprightness of your heart do you go in to possess their land; but for the wickedness of these nations the Lord your God does drive them out from before you, and that he may establish the word which the Lord swore to your fathers, to Abraham, to Isaac, and to Jacob.
WEB · World English Bible
Not for thy righteousness, or for the uprightness of thy heart, dost thou go in to possess their land; but for the wickedness of these nations Jehovah thy God doth drive them out from before thee, and that he may establish the word which Jehovah sware unto thy fathers, to Abraham, to Isaac, and to Jacob.
ASV · American Standard Version

Related passages

From the Treasury of Scripture Knowledge, grouped by the word they explain.

Not for
Though the Canaanites were expelled for their wickedness, it does not follow, that the Israelites were established in their room on account of any distinguished virtue, or because they deserved it. On many occasions, it may be seen in the history of the world, that God punishes the wicked by the instrumentality of other men, who are as wicked as themselves. Not the Israelites' righteousness, but the wickedness of the inhabitants, and the promise of God to their fathers, was the cause of their obtaining Canaan.
Titus 3:5
that he may
Genesis 12:7; Genesis 13:15; Genesis 15:7; Genesis 17:8; Genesis 26:4; Genesis 28:13; Exodus 32:13; Ezekiel 20:14; Micah 7:20; Luke 1:54, 55; Acts 3:25; Acts 13:32, 33; Romans 11:28; Romans 15:8