Security Intelligence Service chief Rebecca Kitteridge has apologised to Kim Dotcom for the behaviour of her spies, who swapped emails about the internet entrepreneur's weight and wife while mocking his chances of getting New Zealand residency.
An extraordinary cache of emails has emerged from an Official Information Act request by the Weekend Herald, including one in which an SIS staff member sends a picture of Dotcom to others, saying, "What a fatty po po."
Ms Kitteridge's apology is the second Dotcom has secured from the intelligence agencies. The Government Communications Security Bureau had to say sorry in 2012 after it was caught carrying out illegal surveillance.
The Kitteridge apology refers to two tranches of emails discussing Dotcom. One group of emails is from 2010, when the SIS was carrying out security checks over Dotcom's residency application.
Staff assigned to do the checks appeared incredulous at the application. "I love this guy Dotcom," writes one. "He has a mega mansion in Auckland with a lap pool and a giraffe and rhinoceros sculptures and he drives million-dollar cars with the number plate GOD etc. He's such a tool - but the best PR [permanent residency] I've had for quite a while. Just another nihilistic crim by the sound of it."
In another email, an SIS staffer says: "I love this guy. He is so dodgy."
The email conversation turned to the possibility of a female SIS staff member marrying Dotcom: "And why not, he could live on his side of the mansion and I could live on the other, our lap pools need never to meet up."
On discovering Dotcom was at the time married to Mona Dotcom, the SIS staffer wrote: "Oh God she's 22 - I hadn't even looked at that."
When it was suggested the woman fight Mrs Dotcom, she replied: "I'm fairly confident the Rangiora Wrecking Crew could take care of a little Filipino lady."
One SIS staff member told another the background check had been assigned as if it were an "ordinary PR". The other agent responded saying the tasking was someone "just having a laugh at your expense".
The SIS went on to raise a red flag with Immigration New Zealand over the FBI criminal investigation into Dotcom. Despite the SIS concerns, Dotcom was granted residency by officials after they briefed their minister, Jonathan Coleman, on his application.
The second group of emails is from 2012 after the FBI arrested the German-born citizen on internet piracy-related allegations relating to his Megaupload business.
One agent sent others an image of Dotcom, saying: "This picture of Dotcom will forever crack me up - what a fatty po po."
One reply stated: "He was never going to get far from the cops on foot, was he?" Another SIS staffer said Dotcom was like the Daleks, the wheeled villains in Dr Who, because "he could be defeated by a small set of stairs".
Dotcom said the SIS emails reflected the attitude of all government departments he had encountered since his arrest in 2012. "According to them we are the rich fat po po German and his teenage Filipino hooker wife living in New Zealand's most expensive home. Let's destroy them. Let's have some fun."
The OIA request to the SIS was accompanied by a privacy waiver from Dotcom. In a letter responding to the request, Ms Kitteridge told the Weekend Herald: "As soon as I read the papers I determined an apology would be needed. I acknowledge that the documents that I am sending you do not reflect well on the service and my apology to Mr Dotcom was completely sincere."
In her apology to Dotcom, Ms Kitteridge said staff involved in the communications had been spoken to. She said the emails "do not reflect the level of professionalism that I expect to see in this organisation".
She told the Weekend Herald that the emails dated from an earlier period in the SIS. "Since that time, the NZSIS has well and truly learned that all internal communications must be completely professional. I have made my expectations in that regard very clear."
She said Prime Minister John Key was told of the apology before it was made in September 2014, just before last year's election.
In a Cabinet reshuffle announced a month later, Mr Key transferred responsibility for overseeing the intelligence agencies to Chris Finlayson, who is also Attorney-General.
It was the first time responsibility for the agencies rested outside the PM's office and came after a string of high-profile controversies on which Mr Key had been called to respond.
The existence of the emails emerged after Dotcom made a series of tweets in March this year in which he claimed he had received an apology because of "perverse" communications between SIS staff.
Ms Kitteridge said that while she accepted the "unprofessional" nature of the communications, she did not "accept all aspects of Mr Dotcom's interpretations of them as expressed in his 'tweets'."
Former US intelligence analyst Paul Buchanan, who runs a NZ consultancy, said the release of the emails showed the greater transparency at the SIS emerging under Ms Kitteridge - who was appointed director in 2013 - in an era in which the rules for the intelligence community had been rewritten after whistle-blower Edward Snowden's disclosures about the US National Security Agency. "They never thought they would be found out," said Dr Buchanan of the SIS staff.
He said the emails were written at a time when the SIS was a closed shop and attempts to extract information were rejected. He said the ranking of the staff was important because it could be dismissed as effectively harmless "gallows humour" if it came from lower level staff. If it involved senior staff, it threatened to breach the professional neutrality intelligence personnel had to adopt.
Kim Dotcom on the SIS emails - in his own words
"I will never forget one thing about the traumatic raid against my family. I will never forget it because it was the most degrading moment of my life. While Mona was begging and refused to see the children, while staff were shaking and crying in fear and after I was beaten up by an anti-terror unit, I saw the police at our home joking and laughing. They had fun doing what they did. They were touring our home like a museum. There was no humanity, no dignity, no respect.
"The New Zealand Government has never treated my family like human beings. (The NZ government view is) They have to be destroyed, we have to win no matter the law or their human rights.
"This government never cared about how much pain and suffering they have caused to my family on the behest of Hollywood moguls. "The SIS emails that have now surfaced reflect what has happened at all Government departments involved in my case. To them it's personal. According to them we are the rich fat po po German and his teenage Filipino hooker wife living in New Zealand's most expensive home. Let's destroy them. Let's have some fun.
"How did we deserve this punishment. What wrong did I do to deserve this? I made 50 million people happy every day with my legitimate websites that can simply be compared with YouTube and Dropbox.
"My offer to go to the United States and to have my day in court was rejected by the US government because they say I shouldn't have bail, be with my children or have any of my assets released to be able to defend myself or to support my family. Why wouldn't I fight against extradition when it is clear that the US government wants to separate me from my children and is doing everything to ensure that I would never have a fair trial?
"From my point of view the New Zealand government is a corrupt, perverse and immoral wilderness for joyfully participating in this US contract prosecution initiated and paid for by Hollywood moguls. It is a scandal and a shame what has happened and continues to happen to my family here in New Zealand."