But in the seventh year Jehoiada took courage, and entered into a compact with the commanders of the hundreds, Azariah son of Jeroham, Ishmael son of Jehohanan, Azariah son of Obed, Maaseiah son of Adaiah, and Elishaphat son of Zichri.
They went around through Judah and gathered the Levites from all the towns of Judah, and the heads of families of Israel, and they came to Jerusalem.
Then the whole assembly made a covenant with the king in the house of God. Jehoiada said to them, "Here is the king's son! Let him reign, as the Lord promised concerning the sons of David.
References for 2 Chronicles 23:3
This is what you are to do: one-third of you, priests and Levites, who come on duty on the sabbath, shall be gatekeepers
one-third shall be at the king's house, and one-third at the Gate of the Foundation; and all the people shall be in the courts of the house of the Lord.
Do not let anyone enter the house of the Lord except the priests and ministering Levites; they may enter, for they are holy, but all the other people shall observe the instructions of the Lord.
References for 2 Chronicles 23:6
The Levites shall surround the king, each with his weapons in his hand; and whoever enters the house shall be killed. Stay with the king in his comings and goings."
The Levites and all Judah did according to all that the priest Jehoiada commanded; each brought his men, who were to come on duty on the sabbath, with those who were to go off duty on the sabbath; for the priest Jehoiada did not dismiss the divisions.