When Athaliah, the mother of King Ahaziah of Judah, learned that her son was dead, she set out to destroy the rest of the royal family.
But Ahaziah's sister Jehosheba, the daughter of King Jehoram, took Ahaziah's infant son, Joash, and stole him away from among the rest of the king's children, who were about to be killed. Jehosheba put Joash and his nurse in a bedroom to hide him from Athaliah, so the child was not murdered.
References for 2 Kings 11:2
Joash and his nurse remained hidden in the Temple of the LORD for six years while Athaliah ruled over the land.