A legal dispute between Microsoft and the Justice Department could expand the power of search warrants overseas and threaten the market share of U.S. technology companies abroad when the case goes before the Second U.S. Circuit Court of Appeals Wednesday.

Microsoft has been fighting off the Obama administration’s attempt to access emails related to a drug trafficking investigation stored in one of the company’s Dublin servers for two years, and on Wednesday will appeal a ruling in the government’s favor from the U.S. District Court for the Southern District of New York handed down last year.

Last July the court ordered Microsoft to comply with the Justice Department’s search warrant ordering the company to hand over emails belonging to the subject of a drug trafficking investigation stored in Ireland, on the grounds that as a company based in the U.S., the company must comply with the warrant regardless of the physical location of the server.

Microsoft argues the government has no such authority to extend over data belonging to foreign nationals, and should instead go through the Mutual Legal Assistance Treaty (MLAT) process — when one country seeks information about foreign nationals from the target’s native law enforcement agencies.

RELATED: Microsoft, Conservative Groups Urge Congress to Reform Reagan-Era Warrantless Email Collection Authority

Beyond the legal ramifications of the case are the economic ones, which will be significant if the court allows the Justice Department to obtain data stored overseas, where Europeans are already wary of trusting U.S. tech companies in the wake of mass surveillance programs revealed by former National Security Agency contractor Edward Snowden.

Microsoft was one of the companies complicit in bulk-data spying programs like Prism, and argues U.S. companies will stand to lose even more credibility and market share in Europe if the Second Circuit upholds the New York district court’s ruling.

But the Redmond-based Windows developer isn’t the only company facing government pushback for adopting anti-spying measures in the wake of the Snowden disclosures. Google and Apple — two other companies outed in the NSA documents — are facing increasing pressure from the FBI over default end-to-end encryption standards adopted over their mobile platforms last fall, which in Apple’s case, not even the company can decipher.

The new standard is already creating headaches predicted by the Justice Department, where officials earlier this summer tried to obtain text messages between suspects involved in trafficking firearms and drugs from their iPhones. Apple responded that as a result of its encryption standard, it was unable to comply, prompting authorities at Justice and FBI to consider a Microsoft-style suit against Apple, according to multiple current and former law enforcement officials cited by The New York Times.

RELATED: Wyden Tells Comey FBI ‘Largely Created’ Its Own Encryption Problem

Amazon, Verizon, Cisco, the U.S. Chamber of Commerce and others have submitted briefs supporting the Microsoft argument, and a number of conservative tech and civil liberties advocacy groups have joined the Windows developer in opposing the 30-year-old Reagan-era legislation acting as the basis of the government’s case, which grants law enforcement default access to any stored electronic communications after 180 days.

“The statute in this case, the Electronics Communications Privacy Act, is almost 30 years old,” Brad Smith, general counsel for Microsoft, said in a blog post discussing the case earlier this year. “That’s an eternity in the era of information technology.”

“For an argument that purports to rest on the ‘explicit text of the statute’… the government rewrites an awful lot of it,” Microsoft said in a brief submitted to the court in April.

According to Microsoft, lumping private communications under the definition of “business records” undermines users’ Fourth Amendment protection, and setting such a precedent threatens public trust in Microsoft and other companies’ cloud-based services.

Microsoft argues digital records are guaranteed the same rights as physical documents under Fourth Amendment protection against unlawful search and seizure, and that for the government to obtain records stored overseas, it must go through the foreign government in question.

“Looking back, there’s no indication that Congress intended to expand the geographic reach of search warrants when the statute was written in 1986, long before the dawn of the era of cloud computing,” Smith wrote.

In its own brief submitted to the Second Circuit, Justice Department lawyers warned Microsoft Outlook’s policy of letting users choose a country of origin and storing their emails in local servers could lead to U.S. users claiming foreign residency “for the specific purpose of evading the reach of U.S. law enforcement.”

Both parties will present their arguments to the court Wednesday, with a decision to follow likely months later.

Follow Giuseppe on Twitter