When Athaliah1 the mother of Ahaziah saw that her son was dead, she proceeded to destroy the whole royal family.
References for 2 Kings 11:1
But Jehosheba, the daughter of King Jehoram and sister of Ahaziah, took Joash2 son of Ahaziah and stole him away from among the royal princes, who were about to be murdered. She put him and his nurse in a bedroom to hide him from Athaliah; so he was not killed.3
References for 2 Kings 11:2
He remained hidden with his nurse at the temple of the LORD for six years while Athaliah ruled the land.