II Chronicles 22:1-12 NKJV
Then the inhabitants of Jerusalem made Ahaziah his youngest son king in his place, for the raiders who came with the Arabians into the camp had killed all the older sons. So Ahaziah the son of Jehoram, king of Judah, reigned. Ahaziah was forty-two years old when he became king, and he reigned one year in Jerusalem. His mother’s name was Athaliah the granddaughter of Omri. He also walked in the ways of the house of Ahab, for his mother advised him to do wickedly. Therefore he did evil in the sight of the LORD, like the house of Ahab; for they were his counselors after the death of his father, to his destruction. He also followed their advice, and went with Jehoram the son of Ahab king of Israel to war against Hazael king of Syria at Ramoth Gilead; and the Syrians wounded Joram. Then he returned to Jezreel to recover from the wounds which he had received at Ramah, when he fought against Hazael king of Syria. And Azariah the son of Jehoram, king of Judah, went down to see Jehoram the son of Ahab in Jezreel, because he was sick.
His going to Joram was God’s occasion for Ahaziah’s downfall; for when he arrived, he went out with Jehoram against Jehu the son of Nimshi, whom the LORD had anointed to cut off the house of Ahab. And it happened, when Jehu was executing judgment on the house of Ahab, and found the princes of Judah and the sons of Ahaziah’s brothers who served Ahaziah, that he killed them. Then he searched for Ahaziah; and they caught him (he was hiding in Samaria), and brought him to Jehu. When they had killed him, they buried him, “because,” they said, “he is the son of Jehoshaphat, who sought the LORD with all his heart.”
So the house of Ahaziah had no one to assume power over the kingdom.
Now when Athaliah the mother of Ahaziah saw that her son was dead, she arose and destroyed all the royal heirs of the house of Judah. But Jehoshabeath, the daughter of the king, took Joash the son of Ahaziah, and stole him away from among the king’s sons who were being murdered, and put him and his nurse in a bedroom. So Jehoshabeath, the daughter of King Jehoram, the wife of Jehoiada the priest (for she was the sister of Ahaziah), hid him from Athaliah so that she did not kill him. And he was hidden with them in the house of God for six years, while Athaliah reigned over the land.
NKJV: New King James Version