VICTORIA -- One man has been arrested after allegedly planning a "serious incident" at a school in Sooke on Thursday.

Edward Milne Community School was under a hold-and-secure order for several hours due to police actions in the area. A message went out to parents of students at the school to notify them of the incident Thursday morning.

A police canine unit was at the school as of 12:15 p.m.

"At this time, all students are safely inside the school and no one is allowed to enter or exit the building," the notice to parents said.

"We are working closely with the RCMP and will put out an update when the situation changes."

Parents and guardians were asked to stay away from the school area. However, dozens of parents were waiting in cars outside the school Thursday afternoon and told CTV News the incident left them feeling helpless and scared.

In a press release, Sooke RCMP said they had received a complaint that a man was planning a "serious incident" at the school.

Police and the school district decided to implement the hold-and-secure procedure, in which no one is allowed to enter or leave the school, until police could confirm there was no longer a threat.

Sooke RCMP worked with Victoria police and West Shore RCMP to locate the suspect, who was arrested and remains in custody, police said.

The hold-and-secure order was lifted after the arrest.

In the Sooke RCMP release, detachment commander Staff-Sgt. Brett Sinden praised the school and police officers for their response to the situation.

"This incident was resolved quickly and safely due to the quick actions of the faculty at Edward Milne Community School, the school district, and our partners at Victoria police and the West Shore RCMP detachment," Sinden said.