So they got rid of the foreign gods they had and worshiped the Lord. And the Lord couldn't stand Israel's misery any longer.