According to court documents released in the case, Microsoft said it was challenging an order from a US magistrate to hand over email data in a criminal investigation from its servers located in Ireland.

A Microsoft legal brief filed Friday says US government "takes the extraordinary position that merely by serving a warrant on any US-based email provider, it had the right to obtain the private emails of any subscriber, no matter where in the world the data may be located, and without the knowledge and consent of the subscriber or the relevant foreign government."

The case comes amid growing concerns about vast US surveillance programs in light of revelations in documents leaked by former National Security Agency contractor Edward Snowden.

The Snowden revelations have fuelled efforts in some countries to require US tech firms to hold data within the country where it is generated, a move many firms say is impractical.

Earlier this year, Microsoft lawyer David Howard said US tech giant was challenging the warrant.

"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 United States," he said in an April blog post.

US telecom giant Verizon filed a brief in support of Microsoft, claiming it has "a substantial interest in judicial interpretations of the Stored Communications Act" which is at issue.

"While Verizon complies with lawful government demands for information, the extraordinary reach of the demand here raises serious questions about its legitimacy," Verizon said.

Verizon said the court order, if upheld, would give "extraordinary and unprecedented" powers to US authorities and "would have an enormous detrimental impact on the international business of American companies, on international relations, and on privacy."