1 Kings 15 starting at verse 9 tells of a righteous king of Judah named Asa. If Abijam, his father, really did repent of his ways and become Abijah, then Asa would have been influenced by that. He was the first king since Solomon to work at clearing his country of Baal and Asherah worship. He even removed his grandmother from being queen mother. He made many reforms. There's this odd story in the passage where Asa went to war against King Baasha of Israel. He took treasure from the temple, gave some to the king of Aram to betray Baasha and help defeat him, and the king of Aram did so. This shows great compromise on Asa's part.
Which should not surprise me when I read 2 Chronicles 14-16 that at this point afterward, Asa would not listen to God's prophets and when he got a serious disease in his feet, he would not trust God but only doctors. And then he died leaving Jehoshaphat as king, a good but compromised man.
What happened? Was he man that God saved from his sins but who still became more sinful in his old age through senility? Was he not truly a follower of God after all? Nobody but God can say for sure, but God still used him to clear Judah of idolatry. God can use anybody. But since Judah and Israel were once one nation, he should never have looked to help from a pagan king in his war against the north. And instead of repenting and turning from his ways when confronted by the prophet Hanani, he put him in prison.
It is like in recent days when Joshua Harris defected from the faith. God used him in many ways to get the church thinking about how best to be pure and faithful to the Lord with our bodies (though he proposed a legalistic way that doesn't really work for our culture), but then he must not have truly followed the Lord or else he wouldn't have defected. Perhaps he'll return, and perhaps God still saved Asa despite himself. Doesn't he do the same for me and you?
All the same, true followers of the Lord may backslide, but it won't be permanent, and the Holy Spirit will bring them back to the church in this life. I hope we can say the same for Asa.