2 Chronicles 23
Priest Jehoiada plans to crown Joash
In the seventh year Priest Jehoiada mustered up some courage and made a pact with the following military commanders:
Azariah (Jeroham's son)
Ishmael (Jehohanan's son) Azariah (Obed's son)
Maaseiah (Adaiah's son)
Elishaphat (Zichri's son)
They went to all of Judah's cities and brought the Levites and Israel's patriarchs back to Jerusalem. The entire assembly made a commitment with the king in God's house. Jehoiada proclaimed, "This is the king's son! Let him reign like the Existing One said about David's ancestors. The priests and Levites who are off duty on the Sabbath will split up:
one third will be gatekeepers,
one third will be at the king's palace,
and one third will be at the Foundation Gate.
All the people will be in the Existing One's temple courtyards. Don't let anyone enter the Existing One's house except the priests and ministering Levites. They can enter since they're holy, but everyone else will follow the Existing One's wishes. The Levites will be armed and surround the king, so they can kill anyone who enters the house. Be with the king when he comes in and when he goes out."
Judah crowns Joash as king
All of Judah and the Levites did as Priest Jehoiada ordered. The ministers who go off duty on the Sabbath were there along with the ones who go on duty. Priest Jehoiada armed the captains with the spears and shields from God's house which King David used. He stationed everyone to be on guard for the king: everyone was armed from the south side of the building to the north side and all around to the altar. Then they brought in the king's son and put the crown on his head and gave him a copy of God's law. They proclaimed him king, and Jehoiada and his sons anointed him, while everyone said, "Long live the king."
Athaliah is killed
When Athaliah heard the noise from everyone running and praising the king, she went into the Existing One's temple. There she saw the king standing by his pillar at the entrance with the captains and trumpeters beside him, while all the common people celebrated, played instruments, and blew trumpets. Athaliah tore her clothes and said, "This is Treason!" Then Priest Jehoiada summoned the military captains and said, "Get her out of here and kill anyone who follows her," also saying, "Don't kill her in the Existing One's house." So they arrested her and took her to the stables at the king's house where they killed her.
Judah celebrates, peace is restored
Jehoiada made a commitment between himself, the king, and all the people that they should be the Existing One's people. Then everyone stormed Baal's temple and tore it down, shattering his altars and statues into pieces and killing Mattan (Baal's priest) in front of the altars. Then Jehoiada posted watchmen at the Existing One's temple under the priests and Levites. They offered burnt offerings to the Existing One just like Moses's Law instructed, and they sung and celebrated just like David did. He stationed gatekeepers around the Existing One's temple so that no one could enter who was unclean in any way. He had the captains, nobles, governors, and all the citizens bring the king down from the Existing One's house, marching through the upper gate to the king's palace where they placed the king on the royal throne. So everyone celebrated and peace was restored now that Athaliah had been executed.