Texts about a retirement complex's unsafe plumbing, which Hutt City Council (HCC) said did not exist, were in fact sent to the mayor who later deleted them.
Residents at nearly 100 apartments in Woburn were exposed to noxious sewer gases and bacteria because of the plumbing, which had been consented and signed off by the council after being reviewed by a registered plumber.
The Plumbers Gasfitters & Drainlayers Board told the council in July 2018 they were investigating.
Another plumber, Mike Stevenson, who uncovered the problems and sent a report to the council and the plumbers board, texted mayor Ray Wallace in February concerned about delays to repairs at the homes, including nine photos showing the gunk in the drains.
Mr Wallace then told his chief executive the plumber believed it was a dangerous and "life-threatening" issue for the elderly residents.
The plumber followed up by texting the mayor: "Hello Mr Wallace. I have attached a small sample of pictures of the Woburn site for your reference. I look forward to your call."
Mr Wallace texted back in February: "I am awaiting a full report from council staff in how this matter is being addressed ... be assured I have asked how this situation has been allowed to happen."
The texts were deleted by the mayor, and the council failed to provide the pictures, in response to an official RNZ request for all communications about the plumbing.
In a response, the mayor's spokesperson said the text messages were "transitory information and generally speaking will be repeated in other correspondence (such as email) rendering the text redundant".
"The Mayor saw no need to retain a copy of the text from Mr Stevenson (dated 14 February 2019) as he had earlier raised the issue via email with the former HCC Chief Executive on 11 February following a phone call from Mr Stevenson," the spokesperson said.
The council did not provide those photos until sending one last night and the remainder today.
The texts only came to light when RNZ contacted Mr Stevenson.
The Ombudsman has warned public agencies for years that texts are considered public records, and must be carefully managed.
The Hutt City Council has said it had done all that was required since being alerted in mid-2018. It signed off the plumbing as compliant with the Building Code, but the July 2018 audit found scores of drains were "unsafe".
Last week, when RNZ asked the council to double-check if there were any texts about the plumbing, it said: "There are no text messages."
The mayor's spokesperson said Mr Wallace could not recall getting the texts. The mayor was dealing with a serious family illness in February.
The Ombudsman said each case must be looked at on its own merits.
"In previous investigations, the Ombudsman has considered texts to and from politicians as official information providing the messages were sent, received or otherwise used by the politician while acting in their official capacity," it said in a statement.
Hutt City Councillor Josh Briggs told RNZ's Morning Report the handling of the text messages raised some serious concerns about transparency, accountability and best practice.
"In 2019 we should be treating text messages the same as we treat emails and letters from residents, and we should be retaining them for everybody to review and look back on rather than deleting them as we see fit," Mr Briggs said.
"It's great he acted on them but for me I don't understand why they would be deleted afterwards as well. If what they're asking is a serious concern and therefore needing to raise that concern, why would you delete the text messages? I don't understand why he would do that."
"I think when anything goes wrong, it always erodes trust towards the council ... it's not good for the community to lose that trust in us."
It took the plumber who did the original work more than 10 months just to fix high-risk plumbing in the complex's hair salon.
Hutt city's new chief executive Jo Miller said the council had had many meetings and conversations with the apartments' owner, the Masonic Villages Trust.
The plumbers board has been working towards a prosecution and has just finished its investigation. RNZ has requested a copy.
'We need to be particularly careful in our interactions'
Email records show Mr Stevenson was in touch with the mayor several times in February and March.
The mayor took this up with his chief executive Tony Stallinger who told him: "Given Mike's claims ... and stated intentions to go to various other outlets included the police, the coroner, the media, etc, we need to be particularly careful in our interactions."
Mr Stallinger also told the plumber that he had "had discussions with the mayor, Ray Wallace so that he is aware of the situation as I understand it."
When RNZ first approached Mr Wallace a fortnight ago, he said the plumbing problems were just "a few leaks".
The mayor has refused all of RNZ's interview requests since the plumbing audit was revealed.
Last week in an online post Mr Wallace said he was pleased the council had put out a statement about its actions at the apartments, "to provide some fact to the fiction that was published last week about council and mayoral incompetence".
He would not clarify what aspect of RNZ's reporting he regarded as fiction.
List MP Trevor Mallard, who represented Hutt South for years, in response said: "A basic role of local elected representatives is to keep a notebook and follow up to ensure constituents are safe.
"Our elders faced unnecessary danger because this didn't happen.
"It is important that action occurs rather than pedantic discussions and buck-passing."
Mr Mallard declined to comment further.