The conversations between Whitehall and the Guardian took place with the explicit approval of Mr Cameron, Deputy Prime Minister Nick Clegg and Foreign Secretary William Hague.

Following the conversations, Mr Rusbridger agreed to what he has called one of the most bizarre incidents in the newspaper’s history.

Two GCHQ security experts oversaw the destruction in a basement of computer files containing information from America’s National Security Agency leaked by Mr Snowden.

Mr Rusbridger said: “We were quite clear we were not going to hand this material back to the British government so we destroyed it ourselves under advice from a couple of GCHQ intelligence experts, who told us which bits of the hard drive to smash up, in what way.”

The files had already been copied and the Guardian will continue to pursue the Snowden story, but from the US.

Mr Rusbridger believed handing the hard drives to the government would have been a betrayal of the newspaper’s source.

Alan Rusbridger: “It was made plain that the government was on the verge of launching legal action against the Guardian”

Former National Security Agency contractor Mr Snowden is now based in Russia.

Asked about the Independent’s story, a spokeswoman for the Guardian told the BBC: “We’re not going to comment on this.”

Meanwhile, a Brazilian man held for nine hours at Heathrow airport under anti-terror laws on Sunday has said he was forced to divulge email and social media account passwords.

David Miranda said his interrogators threatened that he could go to prison if he did not do so.

Mr Miranda is the partner of Guardian journalist Glenn Greenwald who has covered stories based on leaks by US whistle-blower Edward Snowden.

Mr Miranda has launched legal action over the use of the powers on him.