Deuteronomy 9:4

9:4 Do not think to yourself after the Lord your God has driven them out before you, “Because of my own righteousness the Lord has brought me here to possess this land.” It is because of the wickedness of these nations that the Lord is driving them out ahead of you.

Leviticus 18:24

Warning against the Abominations of the Nations

18:24 “‘Do not defile yourselves with any of these things, for the nations which I am about to drive out before you have been defiled with all these things.

Leviticus 18:27

18:27 for the people who were in the land before you have done all these abominations, and the land has become unclean.