After waiting six years Jehoiada the priest decided that it was time to take action. He made a pact with five army officers: Azariah son of Jeroham, Ishmael son of Jehohanan, Azariah son of Obed, Maaseiah son of Adaiah, and Elishaphat son of Zichri.
They traveled to all the cities of Judah and brought back with them to Jerusalem the Levites and all the heads of the clans.
They all gathered in the Temple, and there they made a covenant with Joash, the king's son. Jehoiada said to them, "Here is the son of the late king. He is now to be king, as the Lord promised that King David's descendants would be. 1
References for 2 Chronicles 23:3
This is what we will do. When the priests and Levites come on duty on the Sabbath, one third of them will guard the Temple gates
another third will guard the royal palace, and the rest will be stationed at the Foundation Gate. All the people will assemble in the Temple courtyard.
No one is to enter the Temple buildings except the priests and the Levites who are on duty. They may enter, because they are consecrated, but the rest of the people must obey the Lord's instructions and stay outside.