Florida Active Shooter Drill With Gun-Toting Cop Angers Middle School Parents One student texted mom about a police officer with an assault rifle.

 -- A school lockdown drill in Winter Haven, Florida, angered parents whose children apparently texted in alarm, with one noting that a police officer with an assault rifle came into a classroom.

Initially, only three people knew the lockdown at Jewett Middle Academy on Thursday was only a drill, police said. Parents, teachers and students were not told in advance about the scheduled event because, the school district said, the element of surprise is vital to make the drill effective.

"We don’t want students to be scared, but we need them to be safe," the Polk County School District said in a statement. "Unfortunately, no one gets an advanced notice of real-life emergencies."

Schools throughout the nation run such drills, but often it is up to local districts to determine the specifics of how the drills are run.

There have been two non-drill lockdowns at this school in the past year, police said, adding that neither was found to involve an active shooter. The first came after someone heard what they thought was a gunshot, but no gunman was ever found. The second was prompted by a seemingly threatening note found in the school's trash.

Thursday's drill was announced as another lockdown over the school's intercom system, Jamie Brown, a spokeswoman for the Winter Haven Police Department, told ABC News. Teachers were supposed to follow specific protocols for keeping the children safe in the classrooms.

A school resource officer -- who is a known presence on campus who wears a holstered, loaded pistol -- and a local police officer carrying an unloaded AR-15 went room to room, telling the teachers and students that it was a drill, Brown said.

Brown told ABC News neither officer pointed their gun at students.

Nevertheless, one mom, Stacy Ray, said her children texted her in alarm to say police with guns were in the classroom, according to local station WTVT.

"A lot of people started getting scared because we thought it was a real drill," one of Ray's children, seventh grader Lauren Marionneaux, told the station. "We actually thought that someone was going to come in there and kill us."

"I'm panicking," Ray told WTVT, "because I'm thinking that it's a legitimate shooter is coming, that something bad is happening at the school."

Ray, who did not immediately respond to ABC News’ calls seeking comment, wasn’t alone. Cherrise Tate said her son texted his dad and he started racing to the school.

"It makes me upset that they didn’t let us know," Tate told ABC News. "My husband almost got a ticket coming over here yesterday."

Polk County Public Schools spokesman Jason Geary said parents were sent an email from the school after the drill was complete and the incident is under review by the district's Department of Safe Schools. The district has announced that it will continue to have unannounced drills but uniformed officers will not carry weapons during those drills.

PTA board member Heidi Calvelage, whose son is a seventh grader at Jewett Middle Academy, said she was surprised any parents were upset about the secrecy surrounding the "very necessary" drills.

As for the student apparently texting before the drills have concluded, Calvelage said, "they shouldn’t be using their cells in class in the first place."

ABC News' Katie Yu contributed to this report.