II Chronicles 23:1-21 NKJV
In the seventh year Jehoiada strengthened himself, and made a covenant with the captains of hundreds: 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 Zichri. And they went throughout Judah and gathered the Levites from all the cities of Judah, and the chief fathers of Israel, and they came to Jerusalem.
Then all the assembly made a covenant with the king in the house of God. And he said to them, “Behold, the king’s son shall reign, as the LORD has said of the sons of David. This is what you shall do: One-third of you entering on the Sabbath, of the priests and the Levites, shall be keeping watch over the doors; one-third shall be at the king’s house; and one-third at the Gate of the Foundation. All the people shall be in the courts of the house of the LORD. But let no one come into the house of the LORD except the priests and those of the Levites who serve. They may go in, for they are holy; but all the people shall keep the watch of the LORD. And the Levites shall surround the king on all sides, every man with his weapons in his hand; and whoever comes into the house, let him be put to death. You are to be with the king when he comes in and when he goes out.”
So the Levites and all Judah did according to all that Jehoiada the priest commanded. And each man took his men who were to be on duty on the Sabbath, with those who were going off duty on the Sabbath; for Jehoiada the priest had not dismissed the divisions. And Jehoiada the priest gave to the captains of hundreds the spears and the large and small shields which had belonged to King David, that were in the temple of God. Then he set all the people, every man with his weapon in his hand, from the right side of the temple to the left side of the temple, along by the altar and by the temple, all around the king. And they brought out the king’s son, put the crown on him, gave him the Testimony, and made him king. Then Jehoiada and his sons anointed him, and said, “Long live the king!”
Now when Athaliah heard the noise of the people running and praising the king, she came to the people in the temple of the LORD. When she looked, there was the king standing by his pillar at the entrance; and the leaders and the trumpeters were by the king. All the people of the land were rejoicing and blowing trumpets, also the singers with musical instruments, and those who led in praise. So Athaliah tore her clothes and said, “Treason! Treason!”
And Jehoiada the priest brought out the captains of hundreds who were set over the army, and said to them, “Take her outside under guard, and slay with the sword whoever follows her.” For the priest had said, “Do not kill her in the house of the LORD.”
So they seized her; and she went by way of the entrance of the Horse Gate into the king’s house, and they killed her there.
Then Jehoiada made a covenant between himself, the people, and the king, that they should be the LORD’s people. And all the people went to the temple of Baal, and tore it down. They broke in pieces its altars and images, and killed Mattan the priest of Baal before the altars. Also Jehoiada appointed the oversight of the house of the LORD to the hand of the priests, the Levites, whom David had assigned in the house of the LORD, to offer the burnt offerings of the LORD, as it is written in the Law of Moses, with rejoicing and with singing, as it was established by David. And he set the gatekeepers at the gates of the house of the LORD, so that no one who was in any way unclean should enter.
Then he took the captains of hundreds, the nobles, the governors of the people, and all the people of the land, and brought the king down from the house of the LORD; and they went through the Upper Gate to the king’s house, and set the king on the throne of the kingdom. So all the people of the land rejoiced; and the city was quiet, for they had slain Athaliah with the sword.
NKJV: New King James Version