The US government cannot force Microsoft to give access to its servers located in other countries, a court rules.
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.