I read 2 Chronicles 25: Amaziah did not follow God wholeheartedly, and eventually worshipped the gods of his enemies, causing God to allow his eventual downfall. (archived audio)