Five students were arrested after threats of violence on social media prompted a lockdown at a Courtenay high school Tuesday.

Staff and students at Vanier Secondary School were ordered to barricade themselves behind locked doors with the lights out as police investigated a threat involving weapons-related violence.

Officers arrived just after 2 p.m. and officials initially placed the school under a hold and secure order.

“As we investigated more it was necessary to put students into a full lockdown, and that was a very well-executed, orderly, quiet process,” said Paul Berry, Comox Valley School District’s principal of health and safety.

Teachers and students remained locked down for almost two hours while RCMP investigated.

At around 4 p.m. the order was lifted and everyone was sent home safely.

The five students who were arrested were being held in custody.

No one was injured.