1After Joash had been hidden in the temple for six years, Jehoiada the priest decided that it was necessary to do something. So he made an agreement with the army commanders of groups of 100 soldiers: Azariah the son of Jeroham, Ishmael the son of Jehohanan, Azariah the son of Obed, Maaseiah the son of Adaiah, and Elishaphat the son of Zicri.
2They went throughout Judah and gathered the descendants of Levi and the leaders of Israeli families from all the towns. When they came to Jerusalem,
3the whole group went to the temple and made an agreement with the young king there. Jehoiada said to them, “This is the son of the previous king of Judah. So he is the one who must rule, like Yahweh promised that the descendants of King David must do.
4So this is what you must do: One-third of you priests and other descendants of Levi who are starting their work on the Sabbath day must guard the doors of the temple.
5One-third of you must guard the king's palace, and one-third of you must guard the Foundation Gate. All the other people will be in the courtyards outside the temple.
6Only the priests and the descendants of Levi who work there will enter the temple. They will be allowed to enter the temple because they are set apart for that work. All the others must remain in the courtyards, obeying what Yahweh has commanded.
7You descendants of Levi must stand around the young king, each of you with your weapon in your hand. Anyone else who tries to enter the temple you must kill. And stay close to the young king, wherever he goes.”
8So the descendants of Levi and all the men of Judah did what Jehoiada had told them. He did not allow anyone to go home after having finished his work on that Sabbath day. Each commander took charge of his men, the ones who were finishing their work on that day and those who were starting their work on that day.
9Then Jehoiada gave each of the commanders the spears and the large and small shields that had been put there in the temple by King David.
10He commanded all the guards to stand in their positions, each with his sword in his hand, all around the king—around the altar and the temple, from the north side to the south side.
11Then Jehoiada and his sons brought Joash out. They put a crown on his head and gave him a scroll on which were written the rules that the kings needed to obey, and proclaimed that he was now the king. They anointed him with olive oil and shouted, “We hope that the king will live for many years!”
12When Athaliah heard the noise being made by the people running toward the king and cheering, she ran to the temple.
13She saw the young king there, standing alongside the pillar at the entrance of the temple, which is the place at the temple where the kings usually stood. The army commanders and trumpet players were standing beside the king, and all the people of Judah were rejoicing and blowing trumpets, and singers with their musical instruments were leading the people while they praised God. Then Athaliah tore her robes and started screaming, “You are committing treason!”
14Jehoiada the Supreme Priest said to the army commanders, “Kill her, but do not kill her at the temple of Yahweh!” Then he said to them, “Bring Athaliah out in front of the troops and kill anyone who tries to follow her!”
15She tried to flee, but they seized her as she reached the gate where horses enter the palace area, and they killed her there.
16Then Jehoiada made an agreement that he and the king and all the other people would be Yahweh's people.
17Then all the people who were there went to the temple of Baal and tore it down. They smashed the altars of Baal. They also killed Mattan, the priest of Baal, in front of those altars.
18Then Jehoiada appointed the priests, who were also descended from Levi, to work at the temple. They were part of the group to whom King David had given various jobs at the temple, to sacrifice the animals that were to be completely burned on the altar, doing what was written in the laws that Moses had given to them. He also told them to rejoice and sing, which was also what David had commanded.
19He also put guards at the gates of the temple in order that anyone who was unacceptable to God would not be allowed to enter.
20Jehoiada took with him the army commanders, the important men, the leaders and many others, and brought the king down from the temple. They went into the palace through the Upper Gate, and put the king on his throne.
21Then all the people of Judah rejoiced. And there was calm throughout the city, because Athaliah had been killed.