WASHINGTON — The Supreme Court on Monday agreed to decide whether federal prosecutors can force technology companies to turn over data stored outside the United States.

Disputes between leading technology companies and the Justice Department have become increasingly common, and the new case will give the Supreme Court an opportunity to weigh in on the clash between the demands of law enforcement and the companies’ desire to shield the information they collect to protect their customers’ privacy.

The case, United States v. Microsoft, No. 17-2, arose from a federal drug investigation. Prosecutors sought the emails of a suspect that were stored in a Microsoft data center in Dublin. They said they were entitled to the emails because Microsoft is based in the United States.

A federal magistrate judge in New York in 2013 granted the government’s request to issue a warrant for the data under a 1986 federal law, the Stored Communications Act. Microsoft challenged the warrant in 2014, arguing that prosecutors could not force it to hand over its customer’s emails stored abroad.