Microsoft has warned a US appeals court that forcing it to hand over emails stored on a server in Ireland would demolish internet user privacy worldwide in a “global free-for-all”.

At the heart of the matter is a row over whether the Redmond giant should cough up messages held in an Irish data center – messages belonging to someone living in Dublin. US prosecutors chasing a drugs investigation sought a search warrant in the US to access the files, but Microsoft thinks the action should be taking place on Ireland's soil, where the information is stored.

Microsoft's lawyer Joshua Rosenkranz told the New York court that if Uncle Sam could order multinational companies in America to give up data in systems in other countries, there's no reason other nations couldn't play similar games. Calling it a “matter of national sovereignty,” Rosenkranz added: “We would go crazy if China did it to us.”

The counter from the US government's lawyers was that withholding the data would let criminals and fraudsters evade American prosecutors by sending their data offshore.

As Reuters reports, US assistant attorney Justin Anderson said the question is not “ownership” of the emails (which would protect them from US seizure), but “about custody and control.”

What matters, he said, is where the information is disclosed, not where it is stored, as Bloomberg added.

If there is a loophole in the “pre-Compuserve, pre-AOL” law, Rosenkranz argued, then closing it should be a matter for US Congress.

It's not yet known when the appeals court will hand down its decision. The battle dates back to 2013, but only came to light in May 2014 when a gag order on the case was lifted.

In July 2014, a district court somewhat controversially ruled that the emails in question weren't protected as communications because they were “business records.” Redmond then asked a court to hold it in contempt as part of the process leading to the current appeal.

While Microsoft has garnered the support of more than 100 organisations, including an amicus brief from Ireland, El Reg reported earlier this year that the European Commission was dragging its feet.

The beaks hearing the appeal are District Judge Victor Bolden, Circuit Judge Gerard Lynch, and Circuit Judge Susan Carney. ®