Microsoft privacy
Microsoft has reduced the free storage limits of OneDrive cloud storage and Office 365. David Ramos/Getty Images

Microsoft went to court on Wednesday to appeal a ruling from a federal judge in a case that could have serious repercussions for data storage, security and privacy. The previous ruling said that the company had to hand over emails stored in Ireland to comply with a U.S. warrant.

The appeal is before the U.S. Court of Appeals for the Second Circuit in Manhattan. It is supported by several companies including Apple and AT&T, who have filed documents backing Microsoft's position.

“We would go crazy if China did it to us,” Joshua Rosenkranz, Microsoft’s lawyer, said at the start of the hearing, according to Bloomberg. “This is a matter of national sovereignty.”

The original ruling, handed down in July last year by United States District Court for the Southern District of New York, said that the company had to turn over the emails of a user suspected of drug trafficking. Microsoft argued that the emails, stored in Ireland, could not be subject to U.S. search warrants. U.S. District Judge Loretta A. Preska ruled that as Microsoft controls the emails from the U.S., the location was not relevant.

The American Civil Liberties Union (ACLU) has filed documents supporting Microsoft's position in the appeal. One of the three judges on the appeals panel, Victor Bolden, worked for four years at the ACLU, while another, Gerard Lynch, previously cooperated with the ACLU in arguing cases.

"The power to embark on unilateral law enforcement incursions into a foreign sovereign country – directly or indirectly – has profound foreign policy consequences. Worse still, it threatens the privacy of US citizens," Microsoft said in court documents read by The Guardian.