So they put away the foreign gods from among them and served the Lord; and He could bear the misery of Israel no longer.