A convicted paedophile who had abused underage girls was hired to work on producing popular children's TV show What Now.
The case has exposed serious holes in protocols set up to ensure those employed around children are properly vetted, and the screen industry is now working to draft new guidelines to protect kids.
Though the man was jailed several years ago for his sexual offending, no one carried out a police vetting check before employing him on the TV show after his release from prison.
The Herald can also reveal that the man is now back before the courts after being arrested last year following a Customs investigation, charged with nine counts of possessing, distributing, exporting and making child sexual abuse material.
Court documents allege Customs allegedly found thousands of images and video files on the man's electronic devices, and a small amount of methamphetamine.
He is currently subject to strict bail conditions including to not associate with children under the age of 16.
The man was hired by a company owned by children's entertainer Jason Gunn and his wife Janine Morrell-Gunn. Their company Whitebait Media makes What Now, which screens on TVNZ.
The couple have apologised for the vetting failure and say they were shocked to learn of the man's criminal past and "ceased his employment".
Though the man was jailed several years ago for his sexual offending, no one carried out a police vetting check before employing him on the show after his release from prison.
It is understood NZME, publisher of the Herald, also contracted the man's company for a children's event for a third party last year.
An NZME spokesman said: "NZME has only recently been made aware of the allegations involved in the case you refer to. We are investigating as a priority the circumstances surrounding the engagement of an external company contracted to provide services on occasion to NZME."
A source who worked on What Now said he was sickened to learn of the man's criminal history last year and believe that Whitebait Media should have alerted the schools and NZ On Air.
"Someone needs to be held accountable for this," the source believed.
Schools asked to report any concerns
Ministry of Education deputy secretary Katrina Casey said officials only became aware of the case when contacted by the Herald this week.
"We have asked the production company for the names of the schools impacted. We will follow up with those schools to see if they need any support.
"Any school that has concerns about this person should notify police immediately."
There was no record of the man being employed or contracted by the ministry "in any capacity".
The Herald is unable to name the man for legal reasons but can reveal he was hired by Whitebait Media as a freelance contractor and worked on What Now.
Whitebait Media is owned by Gunn, a former What Now presenter, and his wife Janine Morrell-Gunn, who was executive producer of TVNZ's Children's Unit for seven years.
The company receives millions of dollars each year in NZ On Air funding and is contracted to produce What Now by the state broadcaster.
The source claimed the man had access to schools as part of his work on What Now.
The man has pleaded not guilty to the Customs charges and is due to go to trial in Auckland later this year. The charges carry a maximum penalty of 14 years in prison.
Police refused to confirm whether any investigation was underway into the man's role on What Now.
Whitebait Media apologises for 'failure'
In a statement, Morrell-Gunn apologised for the vetting failure.
The company "ceased his employment" immediately after learning about his background.
"We were very shocked and upset to learn of his arrest and prior convictions. We did not carry out police vetting prior to the contractor's engagement."
Morrell-Gunn said the company asked the Police Vetting service in 2017 whether all its freelance contractors and staff were required to undergo police vetting.
"We were informed that those having 'incidental' contact with children were not."
"We accepted that advice.
"In hindsight, this was a failure on our part and one which we are deeply sorry for. We now require police vetting of ALL staff, contractors and freelancers to ensure this never ever happens again."
The company had adult supervision on-site during rehearsals and recording, and children were not left alone with crew members.
"We have never received any complaints about this contractor.
"We will continue to monitor and improve our procedures to uphold our duty of care to ensure the safety of children."
"We agree with NZ On Air that mandatory police vetting for all staff and contractors should be an industry standard for sets where children are present and this is something which needs to be raised with Screensafe."
Asked why the company did not alert schools or education officials to the man's criminal background, she said that because police were investigating "we felt they were best placed to deal with this issue".
Whitebait Media was now working with the Ministry of Education to ensure affected schools had appropriate information and support.
NZ On Air said it only learned the convicted paedophile had worked on What Now this week after Herald inquiries. A spokeswoman described the revelation as "deeply disturbing".
"Whitebait Media have assured us that they now routinely police vet all crew. At the time the man worked as a freelancer they vetted presenters, as the people who had the closest contact with children, but not crew.
"We have only been made aware of this issue [on Tuesday] but believe the right action was taken by Whitebait Media in increasing police vetting. We think this should be an industry standard for sets where children are present and have raised it immediately with Screensafe."
NZ On Air stressed it had no involvement in employing crew, which was the responsibility of the production company.
TVNZ had "editorial oversight" of the production as the commissioning platform.
A TVNZ spokeswoman said Whitebait Media made TVNZ aware it had terminated the man's contract last year after learning of his past criminal convictions.
The broadcaster confirmed it did not contact police or the schools after being alerted, saying this was the production company's responsibility.
"We support the proactive steps Whitebait Media have taken to strengthen their police vetting policies to cover not just staff with unsupervised contact with children, but all employees, contractors and casuals working on What Now."