Liam Fox has demanded to know if the Guardian can be prosecuted for publishing details of UK and US' surveillance techniques, as he intensifies his attack on the newspaper.

The former defence secretary wrote to Alison Saunders, the director of public prosecutions, asking how a prosecution could be "initiated" following the publication of leaks by Edward Snowden.

"To actually divulge the details of named individual agents to overseas sources is likely to constitute a crime," he told the Telegraph.

"This is why I have written to the director of public prosecutions on the issue.

"No-one has a right to compromise the safety of the people of our country."

Fox was forced to resign as defence secretary in 2011 after he was found to have brought lobbyist and close friend Adam Werritty to top-level diplomatic meetings – a story the Guardian took a leading role in publicising.

He said the newspaper was guilty of "indiscriminate publication" of sensitive materials.

His comments come after the heads of Britain's intelligence groups joined the criticism of the Guardian, saying: "Al-Qaida is lapping it up".

Speaking on the Andrew Marr programme this morning, foreign secretary William Hague added: "From everything I've seen the Snowden allegations certainly have endangered our national security and made it harder for us to protect our country and other countries from terrorist attacks.

"That is something that's very, very serious and very damaging."

The Guardian has come in for sustained criticism from MPs and rival publications for its publication of the Snowden files, but journalists at the newspaper have stuck to their revelations.

The Guardian stories reveal that authorities in the US and UK are using blanket surveillance of their citizens' electronic communications for their counter-terrorism programme – going well beyond the limit set in law.

In the US the political reaction has been very different, with authorities being forced to debate the appropriate limit of surveillance powers.

The revelations have seriously undermined the US' relationship with key European allies such as France and Germany, who have learned the extent of the spying operation conducted by the National Security Agency (NSA).