2 Kings 17:12

For they served idols, whereof the LORD had said unto them, Ye shall not do this thing.

The verse belongs to the account of Samaria's fall and the scattering of the ten tribes by Assyria. It means that Israel served idols in direct defiance of the Lord's explicit command not to do this, a rebellion in which the people turned from the Lord to idol worship. That idolatry was part of a wider rejection of His statutes, covenant, and testimonies, and together with other wicked practices it provoked His anger. The spread of heathen practices among the Israelites was helped by Solomon's alliances with heathen nations.

Those practices replaced the worship of God with idolatry that included human sacrifice and licentious rites. By choosing the practices of other nations and turning from God's ways, Israel began a downfall that continued until the people became subject to the very nations whose practices they had followed. This disobedience brought affliction and defeat and removal from their land to Assyria, as the prophets had said. That defeat was a moment when surrounding nations questioned the power of Israel's God.