2 Chronicles 22:7

And the destruction of Ahaziah was of God by coming to Joram: for when he was come, he went out with Jehoram against Jehu the son of Nimshi, whom the LORD had anointed to cut off the house of Ahab.

Ahaziah had allied himself with his uncle Joram, king of Israel. He came to visit Joram and was present with Jehoram at Jezreel. His coming to Joram was the occasion of his destruction from God, which came as divine judgment upon him. By that visit he was brought into the path of Jehu the son of Nimshi at the very time Jehu was executing the commission for which the Lord had anointed him, to cut off and destroy the house of Ahab, and his presence there with his uncle led to his death.