The inhabitants of Jerusalem made his youngest son Ahaziah succeed him as king because the raiding party that had invaded the camp with the Arabs had killed all the older sons. So Ahaziah, Jehoram's son, became king of Judah.
Ahaziah was 22 years old when he became king, and he ruled for one year in Jerusalem. His mother's name was Athaliah; she was the granddaughter of Omri.
Ahaziah walked in the ways of Ahab's dynasty, encouraged in this wickedness by his mother.
He did what was evil in the LORD's eyes, just as Ahab's dynasty had done, because after his father's death they gave him advice that led to his downfall.
Ahaziah was following their advice when he went with Israel's King Joram, Ahab's son, to fight against Aram's King Hazael at Ramoth-gilead, where the Arameans wounded Joram.
Joram returned to Jezreel to recover from the wounds he suffered at Ramah in his battle with Aram's King Hazael. Then Judah's King Ahaziah, Jehoram's son, went down to visit Joram, Ahab's son, at Jezreel because he had been wounded.
But God used this visit to Joram to bring about Ahaziah's downfall. After his arrival, Ahaziah went with Joram to meet Jehu, Nimshi's son, whom the LORD had anointed to destroy Ahab's dynasty.
While Jehu was executing judgment on Ahab's dynasty, he discovered the princes of Judah, Ahaziah's nephews, serving Ahaziah, and Jehu killed them.
Jehu went looking for Ahaziah, who was captured while hiding in Samaria. He was then brought to Jehu and executed. He was given a decent burial, however, because people said, "He was the grandson of Jehoshaphat, who sought the LORD with all his heart." There were now no members of Ahaziah's dynasty strong enough to rule the kingdom.
When Athaliah, Ahaziah's mother, learned of her son's death, she immediately destroyed the entire royal family of Judah's dynasty.
But Jehoshabeath the king's daughter secretly took Ahaziah's son Jehoash from the rest of the royal children who were about to be murdered, and hid him in a bedroom, along with his nurse. In this way Jehoshabeath, the daughter of King Jehoram, the wife of the priest Jehoiada and the sister of Ahaziah, hid Jehoash from Athaliah so she couldn't murder him.
He remained hidden with them in God's temple for six years while Athaliah ruled the country.