A shadow of a man using his mobile phone is cast near Microsoft logo at the 2014 Computex exhibition in Taipei, June 4, 2014. Reuters/Pichi Chuang

Microsoft Corp. (NASDAQ:MSFT) must turn over email stored on an overseas server to comply with a U.S. warrant, a federal judge ruled Thursday. Microsoft had opposed the ruling, arguing that email stored in the cloud should have the same privacy protections as “paper letters sent by mail.”

The ruling, issued by U.S. District Judge Loretta A. Preska in Manhattan, will require Microsoft to turn over a users’ email stored on its servers in Dublin, Ireland, related to a narcotics case. Microsoft General Counsel Brad Smith said in an op-ed published Thursday in the Wall Street Journal that the case “could well turn on who owns your email -- you or the company that stores it in the cloud.”

The Redmond, Washington, company argued that email stored in the cloud is the property of the user, and thus the U.S. government should only be able to obtain it through due process. The U.S. government has a warrant, “but under well-established case law, a search warrant cannot reach beyond U.S. shores,” Smith argued.

Preska ruled the location of the email was irrelevant because Microsoft controls it from the U.S.

The company is making the case that customers own the data stored on its servers, not Microsoft. “Microsoft believes the higher level of legal protection for personal conversations should be preserved for new forms of digital communication, such as emails or text and instant messaging,” Smith said in the Wall Street Journal op-ed.

Microsoft vowed to appeal. “We will appeal promptly and continue to advocate that people’s email deserves strong privacy protections in the U.S. and around the world,” he said.

Microsoft’s arguments were joined by other large tech companies, including Apple Inc., Cisco Systems Inc., Verizon Communications Inc. and AT&T Inc.

The ruling is the latest hit to the cloud computing industry, already contending with a trust gap exacerbated by leaked documents from former National Security Agency contractor Edward J. Snowden. The leaks showed the extent to which U.S. intelligence apparatus infiltrates large cloud storage providers, and several have reported slowing sales as a result.