The Supreme Court agreed to decide whether law enforcement officials conducting a criminal investigation can demand data held overseas by Microsoft Corp. and other technology companies in a high-stakes clash over digital privacy.

The justices will review a federal appeals ruling that the Trump administration says has become a major obstacle in criminal probes. Already, Google and Yahoo, acquired by Verizon Communications, have stopped complying with search warrants for e-mails and other user data stored outside the country, the Justice Department said.

The lower court said a 1986 law that protects the privacy of electronic communications — and carves out an exception for law enforcement needs — doesn't extend to data kept in other countries. The ruling came in a case involving e-mails stored on a Microsoft server in Ireland.

"Under this opinion, 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," Deputy Solicitor General Jeffrey Wall argued in court papers.

The case will pit federal and state officials against the technology industry, which has lined up behind Microsoft in the litigation. The court will hear arguments early next year and rule by June.

Microsoft urged the court not to hear the case, saying the justices should leave it to Congress to update the 1986 law and deal with the many complexities that surround worldwide electronic data storage.

"The current laws were written for the era of the floppy disk, not the world of the cloud," Microsoft President and Chief Legal Officer Brad Smith said in a blog posting after the court acted. "We believe that rather than arguing over an old law in court, it is time for Congress to act by passing new legislation."

The dispute stems from a 2013 federal effort to get e-mails that the government says would show evidence of drug trafficking. Officials obtained a search warrant, but Microsoft refused to turn over the information, taking the matter to court instead.

The New York-based 2nd U.S. Circuit Court of Appeals eventually ruled that the company didn't have to provide the data. A three-judge panel said the 1986 Stored Communications Act wasn't designed to cross international boundaries.

"Neither explicitly nor implicitly does the statute envision the application of its warrant provisions overseas," Judge Susan Carney wrote. A larger panel of judges later refused to reconsider the ruling on a 4-4 vote.

Microsoft says its policy at the time of the search warrant was to store e-mail content in the data center nearest to the customer's self-declared country of residence, while keeping account information on U.S. servers.

The unidentified person at the center of the Supreme Court case registered for his account as a resident of Ireland, according to one of the lower court opinions. The company had data centers in 40 countries as of 2014, according to court documents.

The Justice Department says the logic behind the appeals court decision would apply even if the account holder were a U.S. citizen living and committing crimes in this country.

"The decision provides a road map for terrorists and criminals in the United States to insulate electronic communications from U.S. investigators," Wall argued. "They need do nothing more than falsely state a location outside the United States when signing up for an account."

A group of 33 states joined the U.S. in urging Supreme Court review.

Microsoft points to past Supreme Court cases that say laws shouldn't be read to intrude on another country's sovereignty unless Congress clearly says that's its intent.

"Execution of a U.S. warrant to seize documents in a foreign country is precisely the kind of foreign incursion that the presumption against extraterritoriality was designed to prohibit, absent clear authorization by Congress," Microsoft said in court papers.

Microsoft says the case could make Americans more vulnerable to probes by foreign governments.

"If U.S. law enforcement can obtain the e-mails of foreigners stored outside the United States, what's to stop the government of another country from getting your e-mails even though they are located in the United States?" Smith said in his blog post.