The Levites and the people of Judah carried out Jehoiada's instructions. The men were not dismissed when they went off duty on the Sabbath, so the commanders had available both those coming on duty and those going off.
Jehoiada gave the officers the spears and shields that had belonged to King David and had been kept in the Temple.
He stationed the men with drawn swords all around the front of the Temple, to protect the king.
Then Jehoiada led Joash out, placed the crown on his head, and gave him a copy of the laws governing kingship. And so he was made king. Jehoiada the priest and his sons anointed Joash, and everyone shouted, "Long live the king!"
Athaliah heard the people cheering for the king, so she hurried to the Temple, where the crowd had gathered.
There she saw the new king at the Temple entrance, standing by the column reserved for kings and surrounded by the army officers and the trumpeters. All the people were shouting joyfully and blowing trumpets, and the Temple musicians with their instruments were leading the celebration. She tore her clothes in distress and shouted, "Treason! Treason!"
Jehoiada did not want Athaliah killed in the Temple area, so he called out the army officers and said, "Take her out between the rows of guards, and kill anyone who tries to rescue her.
They seized her, took her to the palace, and there at the Horse Gate they killed her.
The priest Jehoiada had King Joash and the people join him in making a covenant that they would be the Lord's people.
Then they all went to the temple of Baal and tore it down. They smashed the altars and idols there and killed Mattan, the priest of Baal, in front of the altars.
Jehoiada put the priests and Levites in charge of the work of the Temple. They were to carry out the duties assigned to them by King David and to burn the sacrifices offered to the Lord in accordance with the Law of Moses. They were also in charge of the music and the celebrations.