2 Kings 8:27
And he walked in the way of the house of Ahab, and did evil in the sight of the LORD, as did the house of Ahab: for he was the son in law of the house of Ahab. And he walked in the way of the house of Ahab, and did evil in the sight of the LORD, as did the house of Ahab: for he was the son in law of the house of Ahab.
Ahaziah of Judah walked in the way of the house of Ahab and did evil in the sight of the Lord. He was son-in-law and relative by marriage to the house of Ahab, and that family connection accounts for his loyalty to them. His mother Athaliah influenced him toward wickedness and toward those wicked practices.
That influence from Ahab's house continued after his father's death and helped lead him to destruction. At that time his grandmother Jezebel was still alive. He allied himself with Jehoram of Israel, his uncle.