The Security Intelligence Service blocked Kim Dotcom's application for residency after learning of the FBI investigation into internet piracy - then lifted it at the last minute to allow him and his family to move to New Zealand.
A Herald investigation has found the mega-rich internet tycoon was on the verge of failing in his bid for residency even though Immigration New Zealand officials were doing all they could to get his application approved.
The discovery has led Mr Dotcom to question whether he was granted residency to make it easier to arrest and extradite him to the United States to face the FBI's charges of criminal copyright conspiracy.
"What the United States could rely on in New Zealand is a John Key government that is so eager to please the White House."
Documents released through the Official Information Act show the residency application for Mr Dotcom and his family stalled in mid-October 2010.
Immigration New Zealand, which had pursued Mr Dotcom to secure him under the investor residency, had been told by his immigration agent David Cooper the application would be withdrawn on November 1, 2010 if residency had not been granted. Papers show Mr Dotcom was frustrated with delays with Immigration New Zealand. The papers show a barrier to approving the application was the routine background "Match Check". The check is carried out for Immigration New Zealand by the SIS - but unexpectedly threw up the FBI investigation.
Problems around the check are raised in an Immigration New Zealand report written in October 2010.
The report stated the application had been put on hold on October 13, 2010 after a warning was raised in relation to the Match Check.
"Mr Dotcom is a person for whom a Match Check is not a requirement of policy. However a Match Check was initiated as a prudent measure in the circumstances surrounding the application and given Mr Dotcom's notoriety."
The SIS confirmed through the Official Information Act it had sent a letter to the police "dated 14 October 2010 advising the police of the FBI's interest in investigating Mr Dotcom".
The SIS also confirmed "email correspondence between the NZSIS and Immigration New Zealand" on matters "relating to Mr Dotcom's immigration application". The dates of October 28 and October 29 align with emails sent to Immigration New Zealand lifting the "hold" on the application.
It was granted on October 31 - a Sunday which was one day inside Mr Dotcom's deadline. Mr Cooper wrote to Immigration New Zealand's deputy chief executive Nigel Bickle that afternoon saying: "I have spoken to Kim and passed on the good news. He is absolutely delighted and extends his thanks to all those involved in getting [obscured] and himself across the line."
Mr Dotcom said the family would have stayed in Hong Kong or moved to Switzerland if the residency application had not been approved by the November 1, 2010 deadline.
"I think the US Government preferred the option of me having residency in New Zealand and if you look at what happened to us you'll understand why."
He said he believed Switzerland would have rejected US claims of "criminal copyright violation" as a civil court case.
The Rapidshare filehosting service was based in Switzerland and had won every case brought against it, he said.
"The Swiss wouldn't get aroused about chopping a tall poppy and destroying a legitimate internet business for the Americans. Hollywood John on the other hand gets excited when he's allowed to hang with the big boys.
"The Swiss certainly wouldn't send armed special forces in helicopters and dogs to a resident who has no history of violence. And they wouldn't have bothered using a spy agency to feed surveillance to the US."