In the planning of Operation Debut, police asked the Government's spies to track internet millionaire Kim Dotcom and his associates - and if he presented any risk to officers on arrest.
Despite the resulting over-the-top swoop on Dotcom's mansion, featuring armed police and helicopters, Dotcom presented no threat. However, indignant at his treatment, the 39-year-old German tech mogul has since exacted his revenge on Government figures and top public servants.
He and his legal team have exposed a series of legal blunders which threaten to blow the case apart, impugn New Zealand's international reputation, and potentially expose the Crown to a massive law suit. From Prime Minister John Key to the officer in charge of the case, reputations lie shredded in the fallout. Those caught up in that fallout so far:
The prime minister has had to grit his teeth through two related scandals.
In April, Dotcom revealed he had given ACT Party leader John Banks a $50,000 donation to his ultimately unsuccessful 2010 campaign for the Auckland mayoralty. The gift was registered by Mr Banks as anonymous - sparking a police investigation into whether he had broken local government electoral laws. Although no charges were laid, police made it clear the law was broken and Mr Key has repeatedly had to defend his minister and coalition partner.
Then last week the Government Communications Security Bureau (GCSB) confessed it had illegally spied on Dotcom, apparently after a mistaken belief he was a foreign national and so fair- game for the spies (the agency is specifically barred from collecting information on New Zealand residents).
Mr Key was further embarrassed when it emerged his deputy, Bill English, knew of the GCSB's involvement a month before he did.
As acting prime minister in August, while Mr Key was in the US, Mr English signed an order barring any disclosure of the GCSB's activities in Operation Debut. He didn't tell Mr Key - who only found out about the order in a subsequent GCSB briefing on the blunder.
By then, Mr Key had already gone public on the situation - forcing a public admission that his No 2 had failed to keep him in the loop. Mr Key later told Parliament that Mr English thought the GCSB would have told him.
The ACT leader earned Dotcom's displeasure after snubbing the German entrepreneur, suffering acute back pain in Mt Eden prison following his detention during the police raid. Mr Banks was by now the MP for Epsom and a one-man support partner for the Key administration.
The jail is in Mr Banks' Epsom electorate and Dotcom's lawyer, Greg Towers, phoned the MP to see if he could organise an extra mattress for Dotcom. Mr Banks said he couldn't be seen publicly supporting the Megaupload boss. When Dotcom next tried to call the politician, Mr Banks said he was in a meeting and didn't keep his promise to call back.
Mr Banks has suffered irreparable damage to his reputation over the donations scandal, which continues to plague him. He is widely expected to step down before the 2014 election and pundits are questioning if ACT can survive.
The former GCSB head, now a consultant, presided over the illegal surveillance of Dotcom. Questions remain over why the most basic checks were not made about Dotcom's immigration status before the bureau began to monitor him and hence break the law barring it acting against New Zealand residents. Conspiracy theorists have also honed in on the former diplomat's links to the US - he was seconded to Washington as political counsellor and intelligence liaison officer in the 1980s.
The current director, Ian Fletcher, has copped the flak for the fallout. The agency is undergoing an internal review of all its spying operations, and Mr Key has made it clear Mr Fletcher should meet state services boss Ian Rennie to discuss the agency's future performance.
The police commissioner has so far remained silent on the Dotcom case, hamstrung because it is still before the court. GCSB tried to finger police for the debacle around the German's New Zealand residency status, but Justice Paul Neazor's inquiry has diluted criticism. But the force has yet to explain why the January raid on Dotcom's mansion was so heavy-handed. Dotcom was particularly upset that his pregnant wife Mona couldn't call for medical help after phone lines were frozen.
Further, the courts have ruled senior officers obtained the wrong search warrants - and without valid authorisation police were trespassing. The courts have also decided police should not have sent digital files from Dotcom's computers to the US, where authorities have been building a major piracy prosecution against him.
Possibly the man with most to lose. It is likely Dotcom's legal team will lay a complaint about the actions of the Ofcanz (Organised and Financial Crime Agency New Zealand) raid supervisor.
In evidence given in court on August 9, Mr Wormald said no other agencies surveilled Dotcom - which was contradicted when it emerged he had been a GCSB target. Police had asked for the spy agency's assistance and agents had attended a December meeting about the raid. Dotcom's lawyer, Paul Davison, QC, told the court on Wednesday it was not the first time Mr Wormald had been "inconsistent" in his testimony and corrected other errors in an affidavit.
The Government's lawyers are also in the gun as Dotcom's defence team has repeatedly challenged their work. The restraining orders used to seize Dotcom's property and cash were judged "null and void" by Justice Potter because they didn't give him a chance to mount a defence.
In May, it emerged that Crown prosector Anne Toohey had realised on the morning of the raid authorities were obliged to give notice - and alerted former solicitor general David Collins and deputy Cameron Mander. The raid went ahead anyway.
A potential conflict of interest also exists. Crown Law was already advising US authorities after being tasked with deciding if it was legitimate for the extradition process to begin.
Added to this is the point that the copyright infringement Dotcom is accused of is not an offence on which individuals can be extradited to the US. The additional charges the Americans have prepared against him, of racketeering and money laundering, are - prompting concerns that these are derivative charges, designed to enforce the extradition treaty.
A former medical researcher turned celebrated tech lawyer, US-based Mr Rothken has made a name for himself taking on the big boys of entertainment.
He acted in the first US internet consumer privacy lawsuit against Doubleclick. He also took on a Hollywood studio for users of the digital recorders Replay TV device, who were recording programmes and skipping over the commercials.
His firm also recently began a law suit over the alleged installation of hidden software on certain mobile phones that siphon off data without consent.
The 49-year-old from San Francisco has argued YouTube was accused of the same copyright violations as Dotcom, but not raided.
PAUL DAVISON QC
Has a reputation as one of the country's top litigators. Mr Davison came to the nation's attention in 1998 when he successfully prosecuted Scott Watson for the murders of Ben Smart and Olivia Hope. More recently he acted for former justice minister Sir Doug Graham and Lawrence Bryant in the Lombard finance case.
Editorial: Spying debacle raises more questions
Plunket: Orwell had the Dotcom saga sussed
- The Dominion Post
Do you think schools should be allowed to seize and search students' smartphones in cases of bullying?Related story: Law will allow seizure of phones