In the seventh year Jehoiada decided to do something. He made an agreement with the commanders of the groups of a hundred men: Azariah son of Jeroham, Ishmael son of Jehohanan, Azariah son of Obed, Maaseiah son of Adaiah, and Elishaphat son of Zicri.
They went around in Judah and gathered the Levites from all the towns, and they gathered the leaders of the families of Judah. Then they went to Jerusalem.
All the people together made an agreement with the king in the Temple of God. Jehoiada said to them, "The king's son will rule, as the Lord promised about David's descendants.
Now this is what you must do: You priests and Levites go on duty on the Sabbath. A third of you will guard the doors
A third of you will be at the king's palace, and a third of you will be at the Foundation Gate. All the other people will stay in the courtyards of the Temple of the Lord.
Don't let anyone come into the Temple of the Lord except the priests and Levites who serve. They may come because they have been made ready to serve the Lord, but all the others must do the job the Lord has given them.
The Levites must stay near the king, each man with his weapon in his hand. If anyone tries to enter the Temple, kill him. Stay close to the king when he goes in and when he goes out."
The Levites and all the people of Judah obeyed everything Jehoiada the priest had commanded. He did not excuse anyone from the groups of the priests. So each commander took his men who came on duty on the Sabbath with those who went off duty on the Sabbath.
Jehoiada gave the commanders of a hundred men the spears and the large and small shields that had belonged to King David and that were kept in the Temple of God.
Then Jehoiada told the men where to stand, each man with his weapon in his hand. There were guards from the south side of the Temple to the north side. They stood by the altar and the Temple and around the king.
Jehoiada and his sons brought out the king's son and put the crown on him and gave him a copy of the agreement. Then they appointed him king and poured olive oil on him and shouted, "Long live the king!"
When Athaliah heard the noise of the people running and praising the king, she went to them at the Temple of the Lord.
She looked, and there was the king standing by his pillar at the entrance. The officers and the trumpeters were standing beside him, and all the people of the land were happy and blowing trumpets. The singers were playing musical instruments and leading praises. Then Athaliah tore her clothes and screamed, "Traitors! Traitors!"
Jehoiada the priest sent out the commanders of a hundred men, who led the army. He said, "Surround her with soldiers and take her out of the Temple area. Kill with a sword anyone who follows her." He had said, "Don't put Athaliah to death in the Temple of the Lord.
So they caught her when she came to the entrance of the Horse Gate near the palace. There they put her to death.
Then Jehoiada made an agreement with the people and the king that they would be the Lord's special people.
All the people went to the temple of Baal and tore it down, smashing the altars and idols. They killed Mattan, the priest of Baal, in front of the altars.
Then Jehoiada chose the priests, who were Levites, to be responsible for the Temple of the Lord. David had given them duties in the Temple of the Lord. They were to offer the burnt offerings to the Lord as the Teachings of Moses commanded, and they were to offer them with much joy and singing as David had commanded.
Jehoiada put guards at the gates of the Temple of the Lord so that anyone who was unclean in any way could not enter
Jehoiada took with him the commanders of a hundred men, the important men, the rulers of the people, and all the people of the land to take the king out of the Temple of the Lord. They went through the Upper Gate into the palace, and then they seated the king on the throne.
So all the people of the land were very happy, and Jerusalem had peace, because Athaliah had been put to death with the sword