A man who worked for an Auckland primary school has pleaded guilty to sexually abusing a girl under the age of 12.
But the man's occupation and his name have been suppressed until his sentencing date in September.
A further suppression order prevents the school being named but a final decision on that will be made tomorrow.
Both suppression orders were challenged by the media.
The 46-year-old appeared at the Auckland District Court today where he pleaded guilty to three charges of indecently assaulting a young girl under the age of 12.
Judge Philippa Cunningham remanded the man on bail so he could complete a sex-offender's programme.
She said he had already completed an alcohol programme.
The hearing was largely taken up by lengthy legal arguments surrounding the suppression orders.
The court was told that the offending did not happen at the school and the victim was not a pupil of the school where the man worked for five years.
The school has argued that its identity should remain secret because of public speculation that the man may have offended while he worked there.
The school's lawyer Holly Brown said the school had written to parents and told them about the charges. They had also done full background checks and police checks before employing the man.
She said there was no evidence that the man had offended while working at the school.
The man's lawyer Michael Talbot also produced a letter from his client's estranged partner and the mother of his two children who said the offending had placed pressure on the family.
Judge Cunningham said the letter talked about the family suffering from "real trauma".