A US federal appeals court on Tuesday reaffirmed Microsoft’s legal right to refuse a government order to hand over data stored overseas in a case with important privacy implications.

A divided panel of judges in New York denied a petition by the US for a rehearing of a ruling last year in a case pitting Microsoft against the US government over data stored in servers in Ireland.

The case has been watched closely for its implications for privacy and surveillance in the digital age.

The December 2013 warrant directed Microsoft to turn over the contents of an email account used by a suspected drug trafficker.

Redmond, Washington-based Microsoft handed over account information it kept on US soil, but said the content of emails was off-limits because it was stored on servers in Ireland.

Microsoft chief legal officer Brad Smith welcomed the ruling while noting that “we need Congress to modernise the law both to keep people safe and ensure that governments everywhere respect each other’s borders.”

Many privacy and digital rights activists have supported Microsoft as a way of guarding against overreach by the US government, although some say the implications of the case are not clear.

Mundane as it may seem, even data subject to lightning recall has been stored somewhere … the ‘somewhere’ in this case is a data centre firmly located on Irish soil

Judge Susan Carney, writing a majority opinion