Google has said it will appeal a ruling by a US judge to hand over the emails of Gmail users stored outside of the country – which puts the privacy of non-US citizens at risk.

US magistrate judge Thomas Rueter in Philadelphia ruled on Friday that Google must comply with search warrants issued by the FBI as part of a domestic fraud investigation. He said that transferring emails from a foreign server so FBI agents could review them locally did not qualify as a seizure because there was “no meaningful interference” with the account holder’s “possessory interest” in the data sought.

Rueter wrote: “Though the retrieval of the electronic data by Google from its multiple data centres abroad has the potential for an invasion of privacy, the actual infringement of privacy occurs at the time of disclosure in the United States.”

But the ruling diverges from one made at a federal appeals court, which reached the opposite conclusion in a similar case involving Microsoft and its customer email data stored outside of the US.

A Google spokesperson said in a statement: “The magistrate in this case departed from precedent, and we plan to appeal the decision. We will continue to push back on overbroad warrants.”

The Philadelphia ruling came less than seven months after the second US circuit court of appeals in New York ruled Microsoft could not be forced to turn over emails stored on a server in Dublin, Ireland that US law enforcement sought in a narcotics case. That 14 July decision was welcomed by dozens of technology and media companies, privacy advocates and both the American Civil Liberties Union and US Chamber of Commerce.

The same appeals court voted to not revisit the decision on 24 January, but four dissenting judges called on the US supreme court or Congress to reverse it, saying the decision hurt law enforcement and raised national security concerns.

Both cases involved warrants issued under the US Stored Communications Act, a 1986 federal law that many technology companies and privacy advocates consider outdated, particularly in light of the privacy concerns of the European Union, one of the largest markets entered by key US technology firms, and the revised EU-US privacy shield data sharing agreement.

Google relied upon the Microsoft decision in its defence, saying that it had complied with warrants it had received by turning over data the company knew was stored in the US. But Google said in court documents that it sometimes breaks up emails into pieces to improve its network’s performance, and did not necessarily know where particular emails might be stored.

According to Rueter’s ruling, Google receives more than 25,000 requests annually from US authorities for disclosures of user data in criminal matters.