Auckland Council senior executives stalled the release of a major report, for political convenience in a possible breach of official information law.
The study on the impact of moving the imported car trade away from Auckland was withheld from RNZ by the council for five months, and released only after intervention by the Ombudsman's office.
Email exchanges released by the council to RNZ include a discussion on how the report could be withheld to allow the council to better "manage" its release.
Another executive observed that it "might not be useful" having the report in the public domain during last year's general election campaign.
Almost all of the exchanges over how to handle RNZ's five-month long effort to get the report, include senior staff in the office of mayor Phil Goff.
Mr Goff campaigned on moving the used car trade to another port to free up the waterfront, and in December 2016 tasked the agency Auckland Council Investment's Limited (ACIL), to study the issue.
The report was written by economists at NZIER, and was back with the council subsidiary Ports of Auckland in May last year.
RNZ requested a copy on 28 July, and was told first that ACIL didn't have a report, then that it was incomplete, and finally on 1 August that ACIL was working with the council-owned Ports of Auckland, and it couldn't be released.
RNZ complained to the Ombudsman's office on 6 September.
ACIL wrote to RNZ in October citing the commercial interests of Ports of Auckland as a reason for withholding the report, and noted that it intended to release the report at an unspecified time in the future.
By that time, the future of Auckland's car import trade, and of its entire port had entered the general election campaign with New Zealand First calling for both to be moved to Northport near Whangārei.
In mid-December, the Office of the Ombudsman wrote to RNZ saying Auckland Council had now finalised the study and would release it. RNZ received the report three days before the Christmas break.
Mr Goff criticised the report's approach and panned the finding that the cost and losses from moving the car trade could outweigh the benefit by about $1 billion.
Email exchanges between senior council executive, the mayor's office and ACIL from August to December reveal the council's approach to not releasing the report.
Local bodies are governed by the Local Government Information and Meetings Act or LGOIMA which is similar to the Official Information Act, and deems all information to public be released except in specific circumstances.
"It is only a matter of time before we are required to release it," Michael Quinn the council CEO's executive officer, wrote to ACIL, and two senior staff in the mayor's office on 7 September.
"Assuming we will have to release it at some stage, it might be better to plan for a managed release."
"If (RNZ's Todd Niall) objects, his only recourse is to appeal to the Ombudsman, and that process will take time, and may be overtaken by the planned release."
ACIL's chief executive John Crawford wrote on the same day: "I also have concerns that it might (NOT) be useful if this or the final document is in the public domain during an election campaign.
"My instincts are to withhold it for the maximum period, and for the LGOIMA (request) to be transferred to ACIL."
ACIL had at one point argued that it was withholding the report because it was still in "draft" form, even though that on its own is not a valid ground.
However, that changed in early November, in this exchange between Mr Crawford, and Nirupa George the principal political adviser in the mayor's office.
"Given the report is now final, which was grounds for with-holding originally, why are we still with-holding it?" Mr Crawford asked.
"More work is being done on the report, and therefore it isn't complete from our perspective," Ms George replied.
"From an ACIL perspective the report is complete - and NZIER are not planning to revisit it after discussions with Council. Can you please call to discuss what further work is contemplated," asked Mr Crawford. The email exchange ends there, five weeks before the report was released.
RNZ showed some of the exchanges to Dean Knight, the co-director of Victoria University's Centre for Public Law.
"From what I've seen, there seems to be some gaming going on, or delay that's motivated by extraneous considerations - the political concern about embarrassment about disclosure," Dr Knight said.
"The Ombudsman's eyebrow would be raised by the chain of correspondence," he said.
Phil Goff said he was not involved in decisions about the report's release, but his staff and the council's chief economist had considered it incomplete, and sought more work done on it.
"I've got absolutely nothing to hide on this, and I've got no axe to grind," he told RNZ.