Britain's top crime fighting force has lost its legal fight to force an alleged cyber hacker to hand over the passwords to his encrypted computers in a landmark case.
Lauri Love, 31, is fighting attempts to extradite him to America to face criminal charges for breaking into Federal Reserve computers.
He is accused of stealing "massive quantities" of sensitive data resulting in millions of dollars of losses and Mr Love's lawyers say he faces up to 99 years in prison in the US if he is found guilty.
Officers from the National Crime Agency (NCA) launched an investigation and raided his family home in Stradishall, Suffolk, in October 2013 when they seized encrypted computers and hard drives.
No charges were brought in Britain against Love, but the NCA wants him to hand over his passwords so officers can check the data before the electronics are returned.
Love's team says the application, if granted, would have been a significant blow to privacy and amount to a "power grab" by police services.
Delivering her judgment at London's Westminster Magistrates' Court, District Judge Nina Tempia sided against the NCA.
She agreed with Love's lawyers who argued the NCA should apply to a court under the Regulation of Investigatory Powers Act (Ripa) to force people to hand over their passwords to decrypt data.
She said: "After reading the papers and hearing from the parties, I am not granting the application because in order to obtain the information sought the correct procedure to be used, as the NCA did two-and-a-half years ago, is under section 49 Ripa, with the inherent HRA safeguards incorporated therein."
She added: "The case management powers of the court are not to be used to circumvent specific legislation that has been passed in order to deal with the disclosure sought."
Love, the son of a reverend from Suffolk, is suing the NCA for the return of six bits of encrypted hardware being held which he says contain his entire digital life.
But the NCA is fighting the case and applied to the court to force Mr Love to hand over his passwords before it returns the computers.
The NCA argued that screenshots taken of the computers before the encryption kicked in show that Love had information from Nasa, the US military and the Department of Energy.
Speaking outside court following the ruling, Love said he is "happy" with the result.
He accused the NCA of trying to "coerce" him into handing over passwords and trying to undermine protections safeguarding individuals' property.
He said: "It is a victory, although it is a more an avoidance of disaster.
"It retains the status quo which means there has to be safeguards before you force people to undermine their security."
He added: "If the judge had required that I am forced to pass over information just to get the chance to ask for my property back, it would mean that the police and the executive have the power to take things away without a hearing."
Asked for his response to critics who say that if he has nothing to hide he should hand over his passwords, Love said a wider principle of privacy was at stake.
He said: "That is like saying 'If you have nothing to say, what's the point in having freedom of speech?'
"I would like us to have freedom of speech all of the time, not only when we have something to say.
"And I want people to have the freedom to store their information securely all the time, not just when they have something to hide."
Love is now facing his next fight against an application to extradite him to the US where he is facing hacking charges.
He is facing three different extradition requests from New York, New Jersey and East Virginia.
He insists he will never hand over his passwords to the security services, saying "there will be no decryption".
But he said he is very scared at the prospect of being sent to the US for criminal prosecution.
He said: "It is the worst thing I could imagine happening to me.
"I have to get on with my work and my studies, I can't afford to be stressed or depressed or anxious about it."
Love said he is working with an organisation "trying to make the world more secure and safer" and does not pose a threat to security.
He said his fight against extradition to the US will be a test case for the "forum bar" which was brought in in the wake of the Gary McKinnon case.
The bar is designed to allow British courts to block extradition if it is in the interests of justice for the person to be tried in the UK instead.
Mr McKinnon was saved from being extradited to the US in 2012 when Home Secretary Theresa May stepped in to keep him in the UK.
Love's lawyer, Karen Todner, said: "The case raised important issues of principle in relation to the right to respect for private life and right to enjoyment of property and the use of the court's case management powers.
"A decision in the NCA's favour would have set a worrying precedent for future investigations of this nature and the protection of these important human rights."