The judge overseeing the Megaupload extradition case has stepped down after one of his comments caused his impartiality to be questioned.
Judge David Harvey described the US as the "enemy" while discussing copyright law, at a conference last week.
It attracted attention because he had been dealing with the US government's request that New Zealand hand over employees of the file-sharing site to face copyright and fraud charges.
The accused deny the allegations.
Judge Harvey made the comment at the NetHui internet conference in Auckland on 12 July.
He had been taking part in a discussion about the Trans-Pacific Partnership (TPP) treaty - a proposed intellectual rights agreement involving the US and about a dozen other countries.
The judge had noted that at present it was legal for citizens in New Zealand to hack DVD region codes to watch disks designed to be restricted to other countries, adding that TPP would change this.
"Under TPP and the American Digital Millennium copyright provisions you will not be able to do that, that will be prohibited," he said.
"If you do you will be a criminal, that's what will happen.
"There are all sorts of ways this whole thing is being ramped up and if I could use Russell's tweet from earlier on - we have met the enemy and he is US."
The reference was a play on words adapting the quote "we have met the enemy and he is us".
The news was reported by The National Business Review the same day, but only attracted controversy three days later when the New Zealand Herald published a report quoting local law professor Bill Hodge who said the comment could "be seen as probably an extra-judicial comment that isn't helpful".
The news was then picked up by other media including several US-based tech blogs.
The judge has ruled several times in Megaupload founder Kim Dotcom's favour, including restoring his internet access and ordering the US to hand over evidence gathered against the accused.
Judge Harvey's most recent involvement with the case was a week ago, when he delayed the extradition hearing from August until March next year to allow more time to resolve legal arguments.
A statement given by the chief district court judge of New Zealand, Jan-Marie Doogue, explained Judge Harvey's decision to remove himself from the case.
"He recognises that remarks made in the context of a paper he delivered on copyright law at a recent internet conference could reflect on his impartiality and that the appropriate response is for him to step down from the case," she said.