2 Chronicles22:10

When Athaliah learned that her son Ahaziah, the king of Judah, was dead, she rose to act for herself. Her aim was to secure power and seize the throne by destroying the royal house of Judah. That meant putting to death all the seed royal, every descendant of David who was eligible to rule.

All were killed except the infant Joash, who was rescued when the wife of Jehoiada the high priest hid him in the temple. He was still only a baby when he was concealed there. He then remained hidden for six years while Athaliah ruled in his place.