Concerns over New Zealand's diplomatic relations with the United States were a factor in the Government's decision-making during the legal battle over Kim Dotcom's assets.
The link between the Dotcom case and the relationship with the US has emerged from heavily censored official documents obtained by the Herald under the Official Information Act.
They show the Ministry of Foreign Affairs and Trade (MFat)was included in meetings to brief officials on how aspects of the case could affect relations with the US.
At issue was whether the New Zealand Government would meet a High Court demand to give a written assurance of legal liability if Dotcom later took a damages claim.
If it did not give the undertaking, it faced the possibility that Dotcom would be given back all the assets seized in the dramatic January raid on his Coatesville mansion.
The documents obtained covered the process that led to Cabinet ministers nominating the police force as the agency to be sued if Dotcom took a case against New Zealand.
In an email on March 5 - before the first meeting on the issue - the Crown Law Office's criminal team leader, Madeleine Laracy, wrote: "Penny Ridings [international legal adviser from MFat] will be there to enunciate the implications in terms of the diplomatic relationship with the USA were NZ for this reason not able to pursue the FRO [foreign restraining order] proceedings."
Much of the information from the Ministry of Justice was censored because it "would likely prejudice the international relations of the government of New Zealand".
Information withheld included an email on March 23 from the Ministry of Justice to the Ministry of Foreign Affairs and Trade titled: "Meeting with [US] Ambassador [David] Huebner: Talking Points on Extradition."
Dotcom has said the emails show the case against him was politically driven.
"This is a highly political case. There is no doubt in my mind that from the beginning the executive of New Zealand was deeply involved in everything that has happened."
Dotcom said he had always maintained the case against Megaupload was driven by US politicians acting at the urging of Hollywood.
"This has been a desire from the top and the desire has been answered."
Dotcom was arrested at the request of the FBI in a global operation against his Megaupload filesharing company.
His assets and fortune were seized under a civil order to restrain the alleged proceeds of crime.
When it emerged that the Crown Law Office had used the wrong sort of legal order, the High Court said any new order would be granted only after an "undertaking of liability".
At least five Government ministers were involved in the email trail resulting in the police department accepting it would be the legal respondent for an "undertaking as to damages".
Police Minister Anne Tolley and Attorney-General Chris Finlayson were directly involved, and the papers show Finance Minister Bill English was also copied in on emails.
Justice Minister Judith Collins and Foreign Minister Murray McCully were also kept informed.
Dotcom has secured the use of $6 million from seized funds to pay for his lawyers and cover living costs.
A decision from the High Court at Auckland has cleared the way for him to pay current and future legal bills of $3.6 million - a ruling that has trumped efforts by the police to shut down the internet tycoon's access to seized funds.
The money comes from a $10 million bond that was seized by the government on behalf of the United States as part of its internet piracy case against Dotcom and those involved in his Megaupload file-sharing company.