2 Chronicles 23:7

And the Levites shall compass the king round about, every man with his weapons in his hand; and whosoever else cometh into the house, he shall be put to death: but be ye with the king when he cometh in, and when he goeth out.

Cross-reference

Numbers 3:10 states that any outsider who approaches the sanctuary shall be put to death — the same principle applied here to protect the king in the temple.

2 Kings 11:8 is the parallel account, nearly identical instructions to compass the king with weapons.

2 Kings 11:9 reports the captains obeying Jehoiada's command, fulfilling the order given here.