When Athaliah, the mother of Ahaziah,* saw that her son was dead, she had all the rest of the royal family murdered. But Jehosheba, daughter of King Jehoram, sister of Ahaziah, took Ahaziah's son Joash, stealing him away from the rest of the sons of the king who were being killed. She put him and his nurse in a bedroom to hide him from Athaliah, and he was not murdered. Joash stayed hidden in the Lord's Temple for six years while Athaliah ruled the country.
In the seventh year, Jehoiada sent for the commanders of hundreds, the Carites, and the guards, and brought them into the Lord's Temple. He made an agreement with them and made them swear an oath. There in the Lord's Temple he showed them the king's son and ordered them, “This is what you are going to do: One third of you who come on duty on the Sabbath will guard the royal palace. One third will be at the Sur Gate, and one third at the gate behind the guards. You will alternate in guarding the palace. The two divisions that would normally go off duty on the Sabbath will guard the Lord's Temple for the king. Surround the king with weapons drawn, and anyone who approaches this line must be killed. Stay close to the king wherever he goes.”
The commanders of hundreds followed all the instructions that Jehoiada the priest had given. They each took their own men, those who were coming on duty on the Sabbath and those going off duty, and came to Jehoiada the priest. 10 Then the priest handed over to the commanders of hundreds the spears and shields that had belonged to King David which were kept in the Lord's Temple. 11 The guards stood with weapons drawn surrounding the king by the altar, and in a line around the Temple, from the south side to the north side of the Temple.
12 Then Jehoiada led out the king's son, placed the crown on him, and handed him a copy of God's Law. They proclaimed him king and anointed him. The people clapped, and shouted, “Long live the king!”
13 When Athaliah heard the noise of the guards and the people, she rushed to the crowds at the Lord's Temple. 14 She saw the king standing by his pillar as the custom was. The commanders and trumpeters were with the king, and everyone was celebrating and blowing trumpets. Athaliah ripped her clothes and screamed out, “Treason! Treason!”
15 Jehoiada ordered the army commanders, “Bring her to the men standing in front of the Temple, and kill anyone who follows her.” Earlier the priest had made it clear, “She must not be killed in the Lord's Temple.” 16 They grabbed hold of her, took her to where the horses enter the palace grounds and they killed her there.
17 Then Jehoiada made a solemn agreement between the Lord, the king, and the people that they would be the Lord's people. He also made an agreement between the king and the people. 18 Everyone went to the Temple of Baal and tore down its altars and smashed the idols to pieces. They killed Mattan, the priest of Baal, right in front of the altar.
Then Jehoiada the priest had guards posted at the Lord's Temple. 19 Along with the commanders, the nobles, the governors of the people, and all the people, he led the king in a procession down from the Lord's Temple, entering through the upper gate to the royal palace. There they set the king on the royal throne.
20 All throughout the land people celebrated, and Jerusalem was at peace, because Athaliah had been killed by the sword at the palace.
21 Joash was seven when he became king.
* 11:1 Ahaziah was the king of Judah. 11:4 Jehoiada was the high priest. 11:4 “Carites”: probably foreign mercenaries used as the royal guard.