If Edward Snowden is ever brought back for trial in the US, he would almost certainly be prosecuted under a law dating back to the first world war and which lawyers say is so broadly worded it would leave the National Security Agency (NSA) whistleblower with little room for a defence.

The 1917 Espionage Act has gone through some amendments over the years but its language still reflects the security concerns of a century ago, with references to railroads, forts and telegraphs. But its all-encompassing character has stood the test of time. Section 793 of the law makes it an offence to take, retain or transfer knowledge "with intent or reason to believe that the information is to be used to the injury of the United States, or to the advantage of any foreign nation".

The law does not stipulate whether the information involved would have to be classified, as that word was not in usage at the time the act was passed. More importantly from Snowden's point of view, it says nothing about exemptions for leaks claiming to be in the public interest.

"As much as some may want Snowden to be applauded for his actions, as a legal matter his self-stated laudable intentions are irrelevant to his criminal liability. He can only hope that it will play a role in his sentencing," argued Mark Zaid, a Washington attorney who regularly represents national security whistleblowers.

"Having publicly self-admitted his guilt for having illegally leaked classified information, he has eliminated any likely meaningful legal defence. Snowden unfortunately went about his efforts all wrong and missed available opportunities to generate public debate of the NSA programs but still avoid criminal culpability."

Jesselyn Radack, a former justice department whistleblower who is now national security and human rights director at the Government Accountability Project, pointed out that Snowden would also get no benefit from the 1989 Whistleblower Protection Act, as it excludes those working for the armed services or intelligence community.

However, Radack said that the legal and constitutional implications of the Espionage Act had not been properly tested in its application to whistleblowers. "Snowden could challenge whether the material involved was properly classified, arguing that the Espionage Act is not supposed to be a cover for illegal conduct," she said.

In the most famous attempt to use the act to prosecute a whistleblower, against Daniel Ellsberg, military analyst at the Rand Corporation who leaked documents on the conduct of the Vietnam war, the case was thrown out in 1973 after it emerged that Ellsberg had been illegally wiretapped.

Shamai Leibowitz, a FBI linguist who pleaded guilty to leaking details of wiretaps of the Israeli embassy in Washington to a blogger, was sentenced in May 2010 to 20 months in prison.

In the most similar case to Snowden's, a NSA employee called Thomas Drake was charged in 2010 with 'mishandling documents' for disclosing details of the agency's Trailblazer program – a means of mass collection of data, like the Prism program leaked by Snowden. However, he was able to demonstrate he had not given away classified material, and all ten charges against him were dropped.

Some Espionage Act prosecutions from press leaks are still under way. Jeffrey Sterling, a former CIA employee, is being tried for passing to the New York Times details of a plan to pass flawed nuclear weapon blueprints to the Iranians. He has pleaded not guilty. Meanwhile, the court martial of Bradley Manning, the army private charged with the mass release of defence and state department cables to Wikileaks, is under way in Fort Meade, outside Washington.

Manning's treatment while in solitary confinement, which was described by the UN special rapporteur on torture as "cruel, inhuman and degrading", may now bolster Snowden's precarious chances of avoiding a US trial altogether by fighting extradition.

"In terms of seeking asylum, Snowden would definitely qualify in terms of fear of persecution," Radack said. "Bradley Manning would be exhibit A in that argument."