A Porirua school went into lockdown after students were sent a threatening image on their mobile phones this morning.
It saw NCEA exams disrupted at Aotea College, north of Wellington, and students sent to a nearby school to sit them.
Police said they were notified of a threat made against Aotea College about 10.30am on Wednesday.
More than 500 students were at school at the time and all were escorted from the grounds by police.
A student at Aotea School said they had to sit in the corner of the room for about two-and-a-half hours during the lockdown.
"I was in business studies and then this alarm started going off telling us to listen, and we all got in the corner away from the windows, turned off the lights and sat there," the student told RNZ.
She said most of her classmates weren't that scared during the ordeal.
Principal Kate Gainsford said there were a lot of moving parts in the response from both police and staff.
"The team here just scrambled very, very quickly and did everything they were meant to do and reassure people along the way and now we'll be having this communication with students again tomorrow to let them know what's happening, and with families this evening, so they know what's going on and that everything is okay ," she said.
Gainsford said the school would be open as normal tomorrow.
One parent said it had been a rollercoaster day waiting for her daughter.
"My daughter text me at about 11.30 this morning. She just said that they were in lockdown, at first they thought it was someone with a knife, and then they started getting the messages about somebody threatening to come in and kill them all."
NZQA Level 1 Music, Level 2 Accounting and Level 3 History exams were meant to be held at the school this afternoon.
Students were told through the school's Facebook page they would need to sit exams at nearby Mana College, which could also accommodate students sitting the level 3 digital history exam on personal devices rather than paper.
"We will be able to apply for derived grades for students affected by the disruption to both the morning and afternoon exam sessions," the school wrote on Facebook.
"Any students unable to attend exams on Thursday 10 November due to the effects of today's lockdown will need to contact the school, we will then give them further advice on how they can apply for a derived grade."
On its Facebook page the school said it had closed on the advice of the police as a precautionary measure.
Parents were being asked to collect students from the Okowai Road and Frances Brown entrances, and not to come onto the premises.
Armed police had been escorting students from the school since about 1.45pm this afternoon.
Toa Te Roopu Awhina, Porirua's social service support centre, has also been locked down.
The nearby Li'l Champs Early Learning Centre chose to lockdown, too, but Paremata Primary School was not affected.