​A federal judge in New York City sided with the United States government on Thursday and said that Microsoft must comply with a search warrant compelling the corporation to surrender customer data it stores overseas.

The multi-national computer company has for months now refused to turn over emails and other digital content requested by authorities in the US because the information in question, Microsoft insists, is kept on data servers physically located in Ireland. Previously, Microsoft said in a statement that “a US prosecutor cannot obtain a US warrant to search someone's home located in another country, just as another country's prosecutor cannot obtain a court order in her home country to conduct a search in the United States.”

But District Judge Loretta Preska ruled from a Manhattan courtroom on Thursday that, contrary to the company’s objections, Microsoft must produce the information sought pursuant to a US-based investigation.

"It is a question of control, not a question of the location of that information," Preska said at the conclusion of a two-hour court hearing, Reuters reported from New York.

Microsoft said that it will challenge that ruling, however, and Preska has placed a stay on her decision to keep the order from going into effect ahead of the Second US Circuit Court of Appeal’s anticipated analysis.

“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 said in a statement, the Washington Post reported..

“We will appeal promptly and continue to advocate that people’s e-mail deserves strong privacy protection in the US and around the world,” added the Redmond, Washington-based tech giant.

On the evening before Wednesday’s decision, Microsoft general counsel Brad Smith insisted in an Wall Street Journal op-ed that content stored on the web’s “cloud” — or data that can be accessed from most anywhere with the internet even if it physically exists in a single spot — must have the same legal protections as private property.

“This dispute should be important to you if you use emails,” Smith wrote, “because it could well turn on who owns your email — you or the company that stores it in the cloud.”

“The US government position contravenes the longstanding principle that warrants issued by US courts are generally not enforceable outside the US. It also conflicts with the concept of comity, which US courts have long recognized requires them to give due regard — and, where appropriate, deference — to the laws and legal system of a foreign country,” the Center for Democracy and Technology said in a statement this week. “Applying the US government’s position on a globally reciprocal basis would yield chaos, with governments serving demands on local representatives of global companies seeking disclosure of data stored elsewhere and covered by the laws of the country where it is stored.”