Anyone who does these things is detestable to the Lord; because of these same detestable practices the Lord your God will drive out those nations before you.
Furthermore, Josiah got rid of the mediums and spiritists, the household gods, the idols and all the other detestable things seen in Judah and Jerusalem. This he did to fulfill the requirements of the law written in the book that Hilkiah the priest had discovered in the temple of the Lord.
After the Lord your God has driven them out before you, do not say to yourself, “The Lord has brought me here to take possession of this land because of my righteousness.” No, it is on account of the wickedness of these nations that the Lord is going to drive them out before you.
It is not because of your righteousness or your integrity that you are going in to take possession of their land; but on account of the wickedness of these nations, the Lord your God will drive them out before you, to accomplish what he swore to your fathers, to Abraham, Isaac and Jacob.