Updated

Britain's top civil servant approached The Guardian to demand the newspaper return or destroy secret files leaked by former US intelligence analyst Edward Snowden, reports said Wednesday.

The left-liberal daily's editor Alan Rusbridger has claimed he was ordered to destroy some of the newspaper's Snowden files, having published a series of revelations from the thousands of documents given to it by the former US National Security Agency contractor.

The Guardian said the British government had forced it to destroy files or face a court battle.

The BBC plus the Daily Mail and The Independent newspapers reported Wednesday that the official who pressured them to do so was Cabinet Secretary Jeremy Heywood.

Heywood is Prime Minister David Cameron's most senior policy advisor, acting as secretary to the cabinet, and sits beside him at the cabinet table in Downing Street.

"We won't go into specific cases but if highly sensitive information was being held unsecurely, the government would have a responsibility to secure it," a Downing Street spokesman told AFP.

The Guardian's editor said that two months ago he had been contacted by "a very senior government official claiming to represent the views of the prime minister".

The call led to two meetings in which "he demanded the return or destruction of all the material we were working on".

At the time, the Guardian was publishing revelations about mass surveillance programmes conducted by the NSA and its British counterpart, the Government Communications Headquarters (GCHQ).

Snowden, who has been granted temporary asylum in Russia as he flees a US bid to prosecute him, handed over the material that formed the basis of the newspaper's reports.

Rusbridger said two GCHQ security experts oversaw "the destruction of hard drives in the Guardian's basement" on July 20.

The partner of the Guardian journalist working with Snowden on the leaks meanwhile said he was forced to give the authorities his cellphone and laptop passwords when he was detained for nine hours at London Heathrow Airport.

David Miranda, a Brazilian who has been working with his partner, US national Glenn Greenwald, on the intelligence leaks, was held and questioned Sunday as he travelled from Berlin to the couple's home in Rio de Janeiro.

He has launched legal action against Britain for holding him under anti-terror laws as the government admitted it was kept informed about his detention.

"Words cannot describe what I am feeling now," Miranda told BBC television.

"They took everything from me. They forced me to give my passwords for my cellphone and for my laptop and when you've got somebody's cellphone there's nothing more personal than that.

"They can get into my Facebook, into my mail account, they see all my pictures, all my friends.

"I was on Glenn's computer and my Skype got online, my name just popped up and this feeling of invasion, I can't even start describing how I feel. I'm naked in front of a crowd."

Rusbridger told the BBC that Miranda "wants that material back and he doesn't want it copied".

The detention of Miranda, 28, has caused an international outcry and sparked protests from Brazil.

Cameron's government has faced questions about its involvement after the White House said it had received a "heads up" that police were about to arrest Miranda.

Britain's interior minister, Home Secretary Theresa May, revealed she was briefed in advance of Miranda's detention, but said it was not for her to tell the police whom they should or should not stop at airports.

Cameron's office also denied any political involvement in Miranda's detention.

"The detention was an operational matter for the police. Number 10 was kept informed in the usual way," a Downing Street source told AFP on condition of anonymity.

The London-based law firm acting for the Brazilian said it was challenging the legality of the detention.

Bindmans said it had written to Britain's Home Office saying it would go to court this week if it did not receive assurances that "there will be no inspection, copying, disclosure, transfer, distribution or interference, in any way, with our client's data pending determination of our client's claim."