The people of Jerusalem made Ahaziah, Jehoram's youngest son, king. Raiders from the desert, who had come with the Arabs against the settlement, had killed all the older sons. That's how Ahaziah son of Jehoram king of Judah became king.
Ahaziah was twenty-two years old when he became king, but reigned only one year in Jerusalem. His mother was Athaliah, granddaughter of Omri.
He lived and ruled just like the Ahab family had done, his mother training him in evil ways.
God also considered him evil, related by both marriage and sin to the Ahab clan. After the death of his father, he attended the sin school of Ahab, and graduated with a degree in doom.
He did what they taught him, went with Joram son of Ahab king of Israel in the war against Hazael king of Aram at Ramoth Gilead. Joram, wounded by the Arameans,
retreated to Jezreel to recover from the wounds he received in Ramah in his war with Hazael king of Aram. Ahaziah son of Jehoram king of Judah paid a visit to Joram son of Ahab on his sickbed at Jezreel.
The fate of Ahaziah when he went to visit was God's judgment on him. When Ahaziah arrived at Jezreel, he and Joram met with Jehu son of Nimshi, whom God had already authorized to destroy the dynasty of Ahab.
Jehu, already at work, executing doom on the dynasty of Ahab, came upon the captains of Judah and Ahaziah's nephews, part of the Ahaziah delegation, and killed them outright.
Then he sent out a search party looking for Ahaziah himself. They found him hiding out in Samaria and hauled him back to Jehu. And Jehu killed him. They didn't, though, just leave his body there. Out of respect for his grandfather Jehoshaphat, famous as a sincere seeker after God, they gave him a decent burial. But there was no one left in Ahaziah's family capable of ruling the kingdom.
When Ahaziah's mother Athaliah saw that her son was dead, she took over. She began by massacring the entire royal family.
Jehosheba, daughter of King Jehoram, took Ahaziah's son Joash, and kidnapped him from among the king's sons slated for slaughter. She hid him and his nurse in a private room away from Athaliah. So Jehosheba, daughter of King Jehoram and Ahaziah's sister - she was also the wife of Jehoiada the priest - saved Joash from the murderous Queen Athaliah.
He was there with her, hidden away for six years in The Temple of God. Athaliah, oblivious to his existence, ruled the country.