Microsoft lost its fight to protect a customer's data stored overseas Thursday as a U.S. judge ordered the tech giant to hand over emails stored in Dublin, Ireland.

U.S. magistrate judge James Francis IV issued the warrant last December saying that emails stored in the cloud on Irish servers were of use to a U.S. drug trafficking investigation. Microsoft went on to appeal the decision, arguing that the government has no right to demand overseas data through a warrant. Microsoft lost the appeal in April, and U.S. District Judge Loretta Preska upheld the decision yesterday.

"The only issue that was certain this morning was that the District Court's decision would not represent the final step in this process," Microsoft Executive Vice President and General Counsel Brad Smith said in response to Thursday's ruling. "We will appeal promptly and continue to advocate that people's email deserves strong privacy protection in the U.S. and around the world."

Part of the problem is that there already is an agreement between the United States and Ireland on how to gain access to data stored in each other's borders. The court, however, argued that as long as the service provider has access to the data, then it is within reach of the U.S. government.

"Microsoft believes you own emails stored in the cloud, and that they have the same privacy protection as paper letters sent by mail. This means, in our view, that the U.S. government can obtain emails only subject to the full legal protections of the Constitution's Fourth Amendment," Smith said on Tuesday in The Wall Street Journal.

The case attracted the attention of many tech giants, including Apple, Cisco, AT&T and Verizon. Many firms filed in support of Microsoft, fearful that their cloud services too could come under the long arm of the U.S. law. The ruling in this case, they say, affects the entire world since many U.S. tech firms are the leading international providers of emails and social media.

In rejecting Microsoft's motion to vacate the search warrant, the Magistrate erred by failing to consider the conflicting obligations under foreign and domestic law that arise when courts order providers to produce data about foreign users stored in foreign countries," reads a filing by Apple and Cisco. "By omitting this evaluation -- and by dismissing the Mutual Legal Assistance Treaty ("MLAT") process out of hand with no factual findings regarding the Irish MLAT at issue -- the Magistrate placed the burden of reconciling conflicting international laws squarely on U.S. providers."

For more stories like this, follow us on Twitter!