The protection of the young king required an impenetrable layer of security during his time in the Temple. The Levites were instructed to form a tight perimeter, completely surrounding the king on all sides [מצודת ציון]. To ensure his safety, every man was required to be armed. The primary approach among commentators is that they held standard weapons of war [רש״י, מצודת דוד]. However, because these guards were Levites simultaneously engaged in Temple duties, some held slaughtering knives while others carried various tools, ensuring that not a single guard stood empty-handed [ביאור שטיינזלץ].
The security protocols included strict orders to execute anyone who attempted to enter the restricted area. This severe measure was directed at any outsider who was not part of the secret rebellion. There was a heavy fear that loyalists to Athaliah might try to infiltrate the Temple and assassinate the king, making it necessary to put to death anyone who approached [מצודת דוד, ביאור שטיינזלץ].
The specific focus of these security measures differs slightly from the parallel account in the Book of Kings. While the other account directs its warning to the guards securing the outer perimeter, the focus here is specifically on the inner security circle composed of Levites stationed inside the Temple itself [מלבי״ם]. Ultimately, these Levites were tasked with serving as the king's personal escorts. Their duty was to accompany him closely whenever he arrived or departed, guaranteeing that he remained completely shielded from danger during every step and movement [מצודת דוד, ביאור שטיינזלץ].