The US government cannot force Microsoft to give authorities access to the firm’s servers located in other countries, a court has ruled.
The decision is being seen as a precedent for protecting the privacy of cloud computing services.
The US Department of Justice had wanted to access a server in Ireland, as part of an investigation into a drugs case.
The ruling, made by an appeals court, overturns an order granted by a court in Manhattan in 2014.
The DoJ said it was disappointed by the decision and was considering what it would do next. If it appeals, the case could then move to the US Supreme Court.
Microsoft said it welcomed the ruling.
“It makes clear that the US government can no longer seek to use its search warrants on a unilateral basis to reach into other countries and obtain the emails that belong to people of other nationalities,” Brad Smith, president and chief legal officer, of Microsoft told the BBC.
“It tells people they can indeed trust technology as they move their information to the cloud,” he said.
Microsoft thanked the companies that had backed its appeal, which included the likes of Amazon, Apple and Cisco.
Another of Microsoft’s backers was the Open Rights Group, a UK-based organisation that campaigns for digital rights.
“The US Court’s decision has upheld the right to individual privacy in the face of the US State’s intrusion into personal liberty,” the group’s legal director Myles Jackman said on Thursday.
“As a consequence, US law enforcement agencies must respect European citizens’ digital privacy rights and the protection of their personal data.