Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The U.S. Supreme Court seemed inclined Tuesday to rule against internet giant Microsoft in a legal battle with the U.S. government over access to data belonging to its customers.

For the court, the issue was straightforward: Can the company be compelled to turn over emails stored on its servers overseas? After the hour-long courtroom argument, the answer seemed to be, yes.

The dispute began in 2013, when federal agents served a search warrant on Microsoft's Redmond, Washington, headquarters, seeking the contents of an MSN.com account they claimed was being used to conduct drug trafficking.

Microsoft's office building in South Dublin, seen above, is at the heart of a Supreme Court case that could set off a global free-for-all of internet data storage. Niall Carson / PA Images via Getty Images

Microsoft said it couldn't comply, because the emails were stored on the company's servers in Dublin — one of its more than 100 data centers in 40 countries. Search warrants issued in the U.S., it said, have no effect beyond U.S. borders.

But several members of the court said Microsoft could call up the data remotely with a few keystrokes.

"You can get it if you push a button in Washington," Justice Anthony Kennedy said.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

"It's not the government's fault it's stored overseas," Chief Justice John Roberts said.

Microsoft could choose to store all of its U.S. customers' emails on servers in Canada or Mexico, Roberts said, in order to market its services as beyond the reach of the government, if the emails were truly outside the reach of agents in the U.S.

Related: From news to shoes: How big is big tech?

Justice Samuel Alito said the company could also move customer data around anytime it wants. The notion that U.S. courts can't compel production "is strained."

A victory for the government, Microsoft told the court, would set off a global free-for-all, with any country encouraged to seek data stored anywhere in the world.

With a wrong decision, "you're as likely to break the cloud as to fix it," said the company's lawyer, Joshua Rosenkranz.

The search happens where the data is stored, not where it's handed over to the government, he said, and a warrant issued in the U.S. has no legal authority overseas.

But Justice Department lawyer Michael Dreeben said concerns of a global free-for-all are unfounded. "There isn't an international problem," he said. "That's a mirage Microsoft tries to create."

While there seemed to be little support for Microsoft, several members of the court said they hoped Congress would act quickly on pending legislation to bring laws up to date and render the court's ruling unnecessary.

The federal law governing stored communications was passed in 1986, before the development of electronic mail and the creation of the World Wide Web.

"All agree," said Justice Ruth Bader Ginsburg, "that in 1986 no one heard of the cloud. This type of search didn't exist. Wouldn't it be wiser to let Congress regulate in this brave new world?"

The justices will decide this case by late June.