Schoolchildren were put in lockdown during their lunchtime break when a gang threw rocks at teachers.
Police were called to the high school after a group of pupils from another school turned up with missiles.
The alarm was raised when they hurled stones and cans at teachers at Ysgol y Creuddyn school near Penrhyn Bay, Conwy, North Wales.
Children at the school were forced to stay indoors during lunchtime in a bid to protect them from "threatening behaviour".
Worried parents were sent an email from the school to say staff had made the decision to "not allow learners out on the school field during lunchtime".
It said: "We made this decision as a precaution due to a group of learners from other secondary schools from the area [who] had made an attempt to come onto school grounds before lunchtime, and had shown challenging and threatening behaviour towards members of staff at Ysgol y Creuddyn."
The school said it was aware the group of young people had been involved in another incident the day before - and police were informed.
The email said: "The safety of our learners and staff is our utmost priority. For that, this decision had to be made today to ensure that our learners stayed in the school building under staff supervision.
"The mature behaviour and attitude of our children and young people must be commended in their willing cooperation as we assessed and dealt with this possible risk.
"I would like to stress, in closing, that everyone is fine and safe at school and that lessons will continue as normal this afternoon."
A North Wales Police spokesman said "We received a call at 12.06 pm reporting a group of youths throwing stones and cans and being verbally abusive to staff.
"Officers attended, but the youths, who were not pupils at the school, had left the area; however, our enquiries into this incident are currently ongoing."