When Athaliah, the mother of Ahaziah, sees that her son is dead, she rises and destroys all the royal offspring. But Jehosheba, Ahaziah's sister and daughter of King Joram, takes Joash, Ahaziah's son, from among the princes who were about to be killed, and hides him with his nurse in a bedroom. They hide him from Athaliah, and the child stays hidden in the house of the Lord for six years while Athaliah reigns over the land.
In the seventh year the priest Jehoiada summons the commanders of the guards and the soldiers to the temple, makes a covenant with them under oath and shows them the king's son. He gives them instructions: one third of the guard will watch the palace, another third the gate of Sur, another the gate behind the guards, and the two guard units going off duty on the Sabbath will protect the king in the temple. Jehoiada gives the captains the spears and shields of King David that were in the temple.
They bring out the king's son, put the crown on him, give him the testimony, anoint him and proclaim him king. All clap their hands and cry out, Long live the king. Athaliah hears the noise of the people and the guards, enters the temple, sees the king at his post with the captains and the trumpeters, tears her clothes and cries treason. Jehoiada orders her taken out between the ranks, and anyone who follows her is to be put to the sword. They lay hands on her at the horses' entrance of the palace and kill her there.
Jehoiada makes a covenant between the Lord, the king and the people, that they should be the Lord's people, and another between the king and the people. The people tear down the temple of Baal, break its altars and images, and kill Mattan, the priest of Baal, before the altars. Jehoiada posts guards over the house of the Lord. Joash reigns at seven years old, and the city is quiet.