Deuteronomy 9:4

4 a“Do not say in your heart, after the Lord your God has thrust them out before you, ‘It is because of my righteousness that the Lord has brought me in to possess this land,’ whereas it is bbecause of the wickedness of these nations that the Lord is driving them out before you.

Joshua 7:12

12 cTherefore the people of Israel cannot stand before their enemies. They dturn their backs before their enemies, because they have become edevoted for destruction.
That is, set apart ( devoted) as an offering to the Lord (for destruction)
I will be with you no more, unless you destroy gthe devoted things from among you.
Copyright information for ESV