Sixth graders were initially terrified to learn that a masked gunman was on the prowl inside their North Carolina middle school.

But once they learned the gunman was a school employee unwittingly putting them through an emergency preparedness exercise, their minds were set at ease — and their parents became the terrified ones.

The Eastern Wayne Middle School employee donned a ski mask and toy gun, and pretended to be a robber. The school described the incident as “an enrichment lesson on exhibiting good citizenship and observing your surroundings.”

“Even though play-acting caused some initial concerns, once the skit was completed, the teachers quickly explained who the person was and that the theft was not real,” wrote the school’s principal, Catherine Fulcher, in a letter to parents.

Still, many parents called to voice their complaints that their children would purposely be led to believe that they were in danger.

The school eventually backpedaled, admitting that while the intention behind the exercise was good, its execution was not.

“The exercise in its original intent was appropriate, but in how it was executed it obviously lacked judgment,” said Ken Derksen, a spokesperson for the school district, in a statement to ABC News.

Fulcher did not respond to a request for comment.

Follow Robby on Twitter