Microsoft has suffered a setback in its efforts to block United States federal prosecutors from seizing a Microsoft customer’s data that is stored overseas.

Judge Loretta A. Preska of the United States District Court for the Southern District of New York on Thursday upheld a magistrate judge’s earlier ruling that Microsoft must turn over the customer’s emails, held in a Microsoft data center in Ireland. Big technology companies have rallied around Microsoft in the case, seeing the ruling as a potential threat to their plans to offer cloud computing services overseas.

Microsoft plans to appeal the ruling. Judge Preska agreed to stay her order while the company pursues the appeal.

The issue at the heart of the case is whether communications kept in data centers operated by American companies are beyond the reach of domestic search warrants. Microsoft has argued that federal prosecutors cannot seize the data in Ireland because United States law does not apply there, even though Microsoft controls everything in its data center there.

“What is at stake is the privacy protection of individuals’ email and the ability of American tech companies to sustain trust around the world,” Bradford L. Smith, Microsoft’s general counsel, said in an interview after the ruling.

The Microsoft case is believed to be the first time that a United States company has fought against a domestic search warrant for data stored overseas.

Craig A. Newman, a lawyer with Richards Kibbe & Orbe who was present in the courtroom in New York on Thursday but is not involved in the case, said the case could lead to a clash between European and United States privacy laws.

“This type of ruling is going to open up a Pandora’s box of concerns by European countries,” Mr. Newman said.

More individuals and corporate users of technology rely on services that store emails, documents and other private data in the cloud. Technology companies like Microsoft are building data centers around the world to meet that demand.

But customers in some countries are concerned the rulings in the New York case could mean that their private data is accessible to United States law enforcement. Mr. Smith in an earlier interview said he was quizzed about the case in the spring by technology officials for German government agencies and told that they would not use data centers operated by United States companies if the search warrant was allowed to proceed.

Privacy concerns are already elevated in Germany and other countries after revelations of electronic surveillance by Edward Snowden, the former contractor for the National Security Agency. Verizon, AT&T and Apple have all filed briefs in support of Microsoft’s opposition to the search warrant, along with the Electronic Frontier Foundation, an online civil rights group.

The search warrant in the case was granted by a federal magistrate judge in New York late last year. The identity and nationality of the customers whose emails are being sought have not been disclosed so far, though the warrant in the case suggests that it is related to drugs.