The Environmental Protection Authority (EPA) was warned the behaviour of its chief scientist was damaging trust in the organisation shortly before she resigned.
Documents obtained by RNZ show the Prime Minister's chief science advisor and the Environment Ministry felt Jacqueline Rowarth's public statements were undermining the EPA's credibility.
When Dr Rowarth resigned last month as the Environmental Protection Authority's chief scientist, she'd been in the role for just 15 months. Dr Rowarth was previously a professor of agribusiness at Waikato University.
Her appointment in 2016 was contentious from the outset - with scientists criticising her for suggesting the Waikato River was in the top five cleanest in the world.
Her approach continued to attract attention last year.
Dr Rowarth criticised a fresh water scientist in a radio interview, dismissed scientific concerns about a prominent weed-killer, and angered environmentalists and annoyed the government when she described irrigation as a "great boon" to the environment.
The Prime Minister's chief science advisor Sir Peter Gluckman said many of Dr Rowarth's comments were innapropriate for a regulator.
"And these kind of statements were undermining trust in the regulator and there were also the issues ... just the general way in which she approached these sensitive issues," Sir Peter told RNZ.
In December, Sir Peter took his concerns directly to the EPA's chief executive Allan Freeth.
"Allan just indicated to me that he was aware of the concerns that were held both within my office and in the wider Environment Ministry - that he had addressed them in a constructive way.
"And that he would be looking in due course for a new person in that role."
Dr Freeth declined to be interviewed.
Emails obtained under the Official Information Act show Environment Ministry chief executive Vicky Robertson also contacted the EPA and the associate Environment Minister with her concerns about Dr Rowarth.
Ms Robertson also declined to be interviewed but it is clear she was alarmed at Dr Rowarth's conduct.
"As we have discussed before how the EPA thinks about the use of its voice as a regulator is critical to the overall credibility of the EPA," she wrote.
"On this occasion we have concerns about the science behind some of the statements made by your Chief Scientist."
Ms Robertson went on to dispute the science behind Dr Rowarth's publically stated views on irrigation, water quality and even synthetic foods and said at "the very least" there was a need for Dr Rowarth to engage with the Ministry's scientists.
Associate Environment Minister Eugenie Sage also met with the EPA to discuss Dr Rowarth following her comments on irrigation.
"The issue was raised and I understood there was action already in train ... to raise with her the concerns."
Ms Sage said she continued to have confidence in the integrity of the EPA and Dr Freeth.
Dr Rowarth did not respond to requests for an interview.