And they cast out the foreign gods from their midst and served the Lord, so that he grieved over the misery of Israel.