(Adds reaction by Microsoft, background on dispute)
WASHINGTON, Oct 16 (Reuters) - The U.S. Supreme Court on Monday agreed to resolve a major privacy dispute between the Justice Department and Microsoft Corp over whether prosecutors should get access to emails stored on company servers overseas.
The justices will hear the Trump administration's appeal of a lower court's ruling last year preventing federal prosecutors from obtaining emails stored in Microsoft computer servers in Dublin, Ireland in a drug trafficking investigation.
That decision by the New York-based 2nd U.S. Court of Appeals marked a victory for privacy advocates and technology companies that increasingly offer cloud computing services in which data is stored remotely.
Microsoft, which has 100 data centers in 40 countries, was the first U.S. company to challenge a domestic search warrant seeking data held outside the country. There have been several similar challenges, most brought by Google.
"If U.S. law enforcement can obtain the emails of foreigners stored outside the United States, what's to stop the government of another country from getting your emails even though they are located in the United States?" Brad Smith, Microsoft's president and chief legal officer, said in a blog post on Monday.
The Justice Department said in its appeal that the lower court ruling "gravely threatens public safety and national security" because it limits the government's ability to "ward off terrorism and similar national security threats and to investigate and prosecute crimes."
The case attracted significant attention from technology and media companies concerned that a ruling favoring the government could jeopardize the privacy of customers and make them less likely to use cloud services because of concern that data could be seized.
The appeals court ruled that Microsoft could not be forced to turn over emails sought in the narcotics case that were stored in Dublin. The Microsoft customer in question had told the company he was based in Ireland when he signed up for his account.
Though Microsoft is based in Washington state, the court said the emails were beyond the reach of U.S. domestic search warrants issued under a 1986 law called the Stored Communications Act.
The Microsoft case is the second that the justices have agreed to hear in their current term that touches upon privacy rights in the digital age and the sheer amount of data on customers that companies now hold. The other case concerns whether police officers need a warrant to access historic location information on cell phone users that is held by wireless carriers.
Rulings in both cases are due by the end of June.
BEYOND THE REACH
In the Microsoft dispute, the Justice Department asked the appeals court to rehear the case but in January the full court split 4-4 on whether to do so, leaving the original decision intact.
The lower court ruling put stored electronic communications held overseas beyond the reach of U.S. prosecutors even when there is probable cause that they contain evidence of a crime, Justice Department lawyers said in court papers.
In the appeals court, Microsoft was supported by dozens of technology and media companies including Amazon, Apple, CNN and Verizon Communications, as well as the American Civil Liberties Union and the U.S. Chamber of Commerce business group.
A coalition of 33 U.S. states and Puerto Rico backed the Justice Department's appeal.
In the underlying case, the government in 2013 sought a warrant requiring information about a Microsoft email account that prosecutors believed was being used for narcotics trafficking. No further details about the investigation have been made public.
The Supreme Court has twice in recent years ruled on major cases concerning how criminal law applies to new technology, on each occasion ruling against law enforcement. In 2012, the court held that a warrant is required to place a GPS tracking device on a vehicle. In 2014, the court ruled that police need a warrant to search a cellphone seized during an arrest.
(Reporting by Lawrence Hurley; Editing by Will Dunham)