The 150 students at Logan Park High School who were put into isolation and tested for COVID-19 have been cleared of having the virus.
The students from the Dunedin school were tested after they were identified as close contacts of a teenager at the school who tested positive for COVID-19.
Director-General of Health Dr Ashley Bloomfield said in a statement the results indicate that the Dunedin cases were linked to overseas travel, rather than a possible community link.
"This is reassuring for the local community and for our broader public health response.
"All 150 close contacts will remain in self-isolation for a period of 14 days. Over that time, as a further precaution, they will be watched carefully for symptoms in case they develop," Dr Bloomfield said.
The school is being cleaned and will reopen on Tuesday.
Dunedin's mayor said on Wednesday he hopes people take more notice of the messages given about the seriousness of the two COVID-19 cases in the city.
Aaron Hawkins' comments follow a party of hundreds in the university student quarter.
University of Otago students on Tuesday held a large St Patrick's Day party just metres from Logan Park High School.
Hawkins said Dunedin has cancelled all public events likely to attract 100 or more.
"I would hope that people would take that guidance seriously and it isn't necessarily what we've seen in the last 24 hours in Dunedin."