A federal appeals court in Manhattan ruled Thursday that a search warrant in a narcotics investigation ordering Microsoft to turn over emails stored on a server in Ireland could not be enforced, creating a new hurdle for law enforcement in a closely watched case.

The U.S. Second Circuit Court of Appeals said federal warrants could only be enforced if an email is stored on a domestic server, but could not be given extraterritorial effect — even if an internet service provider can access the data from a location in the United States.

advertisement | advertise on newsday

Internet service providers usually store data in servers closest to the home country named by a customer. The court acknowledged that information isn’t checked, theoretically letting U.S. customers intent on putting their emails outside the reach of a warrant to falsely claim a foreign residence.

The court said the problem can be fixed by updating the Stored Communications Act, the 1986 law protecting privacy of digital communications. “The policy concerns raised by the government are significant and require the attention of Congress,” wrote Judge Gerard Lynch in a concurrence.