The U.S. Supreme Court agreed on Monday to hear an appeal from the Justice Department on whether U.S. investigators can obtain emails stored overseas if they have a search warrant.

Since 2013, Microsoft has defied U.S. authorities in turning over emails that were stored on a data center in Ireland. While the investigators had a search warrant to obtain private records - in this case, emails - regarding a drug-trafficking case, Microsoft argued the warrant was valid under U. S. law but did not apply to other countries.

Microsoft’s lawyers maintained that the Stored Communications Act of 1986, the federal law that regulates electronic records, does not extend beyond the United States. Under the same logic, the tech company argued foreign governments could cause Microsoft to turn over data stored on U.S. servers.

A three-judge panel of the 2nd Circuit Court in New York overruled the Justice Department in favor of Microsoft. The Microsoft-Ireland decision, as it has come to be known, set a precedent for tech companies on U.S. soil. Essentially, tech companies can withhold digital evidence of crimes in the United States if the data is on a foreign server.

“Hundreds, if not thousands, of investigations of crimes - ranging from terrorism to child pornography to fraud - are being or will be hampered by the government’s inability to obtain electronic evidence,” Jeffrey Wall, Deputy Attorney General, said in the appeal, which was made in June. “The decision protects only criminals whose communications are placed out of reach of law enforcement officials because of the business decisions of private providers.”

The Supreme Court will hear the case early next year. Unlike most cases regarding privacy, the case does not hinge on Fourth Amendment rights against unreasonable search and seizure, but the Stored Communications Act of 1986 on electronic records and privacy.