2 Chronicles 23:2-12

2 They went throughout Judah recruiting the Levites from all the cities of Judah, as well as the family heads of Israel, who then came to Jerusalem.
3 The entire assembly made a covenant with the king in God's temple. Jehoiada said, "Look! Here is the king's son. He must be king, just as the LORD promised about David's descendants.
4 This is what you must do: A third of you priests and Levites coming on sabbath duty will guard the gates
5 another third will be at the royal palace, and another third will be at the Foundation Gate. Meanwhile, all the people will be in the courtyards of the LORD's temple.
6 Don't enter the LORD's temple, because only the priests or Levites on duty can do that. They are allowed to enter because they are holy, but the rest of the people must follow the LORD's requirements.
7 The Levites must surround the king, each with his weapons drawn. Whoever comes near your ranks must be killed; stay near the king wherever he goes."
8 The Levites and all Judah did everything that the priest Jehoiada ordered. They each took charge of those men reporting for duty on the Sabbath, as well as those going off duty, since Jehoiada hadn't released any divisions from duty.
9 Then the priest Jehoiada gave the unit commanders King David's spears and large and small shields that were kept in God's temple.
10 He positioned all the people, each with their weapons drawn, near the altar and the temple, stretching from the south side of the temple to the north side, so as to protect the king.
11 Then they brought out the king's son, crowned him, gave him the royal law, and made him king. Jehoiada and his sons anointed him as everyone cried out, "Long live the king!"
12 When Athaliah heard the noise made by the people running and cheering the king, she went to the people at the LORD's temple