The White House has said US law enforcement officials did not ask their British counterparts to detain the partner of the journalist who first reported secrets leaked by fugitive US intelligence agency contractor Edward Snowden.

However, it said British officials did give their US counterparts a "heads up" about the decision to detain David Miranda, the partner of Guardian reporter Glenn Greenwald.

"This is a decision they made on their own," White House spokesman Josh Earnest told reporters at a briefing this evening.

He did not provide information about how far in advance British officials notified the US that Mr Miranda would be detained.

Mr Miranda was passing through London's Heathrow Airport yesterday on his way home to Rio de Janeiro when he was detained under anti-terrorism laws.

Mr Miranda, who lives with Mr Greenwald, the journalist who interviewed Mr Snowden, was stopped at 8.30am returning from a trip to Berlin.

He was questioned under Schedule 7 of the Terrorism Act 2000, which applies only at airports, ports and border areas, allowing officers to stop, search, question and detain individuals.

Mr Miranda was held for nine hours - the maximum the law allows before officers must release or formally arrest the individual - before being released without charge.

But his electronic possessions, including his mobile phone, laptop, camera, memory sticks, DVDs and games consoles were confiscated.

Mr Miranda said: "I remained in a room. There were six different agents coming and going. They asked questions about my entire life, about everything.

"They took my computer, video game, mobile phone, my memory card. Everything."

Mr Greenwald said: "This is a profound attack on press freedoms and the news-gathering process.

"To detain my partner for a full nine hours while denying him a lawyer, and then seize large amounts of his possessions, is clearly intended to send a message of intimidation to those of us who have been reporting on the NSA and [UK intelligence agency] GCHQ.

"The actions of the UK pose a serious threat to journalists everywhere.

"But the last thing it will do is intimidate or deter us in any way from doing our job as journalists.

"Quite the contrary: it will only embolden us more to continue to report aggressively."

The 2000 Terrorism Act gives British border officials the right to question someone "to determine if that individual is a person concerned in the commission, preparation or execution of acts of terrorism".

Police defend detention decision

The Metropolitan Police said this evening the detention of Mr Miranda was "legally and procedurally sound" and it denied allegations he was not given access to a lawyer.

It said in a statement: "The examination of a 28-year-old man under Schedule 7 of the Terrorism Act 2000 at Heathrow Airport on Sunday 18 August was subject to a detailed decision making process.

"The procedure was reviewed throughout to ensure the examination was both necessary and proportionate.

"Our assessment is that the use of the power in this case was legally and procedurally sound.

"Contrary to some reports the man was offered legal representation while under examination and a solicitor attended. No complaint has been received by the Metropolitan Police Service at this time."

Mr Snowden faces criminal charges in the US after leaking documents disclosing previously secret US surveillance programmes.

Russia rejected US pleas to send Mr Snowden back to the US for trial, instead granting him temporary asylum on 1 August.

Rio de Janeiro-based Mr Greenwald has interviewed Mr Snowden and used 15,000 to 20,000 documents that Mr Snowden passed to him to reveal details of the National Security Agency's surveillance methods.

While in Berlin, Mr Miranda visited Laura Poitras, the US film-maker who has also been working on the Snowden files with Mr Greenwald and the Guardian.

Brazil's government complained about Mr Miranda’s detention.

"This measure has no justification since it involves an individual against whom there are no charges that can warrant the use of this legislation," the Brazilian foreign ministry said in a statement.

The Guardian said it was "dismayed" at Mr Miranda's detention and that it would be pressing British authorities for an urgent clarification.

Mr Miranda's flights are reportedly being paid for by the Guardian.

A spokesman for the newspaper said: "David Miranda is not an employee of the Guardian. As Glenn Greenwald's partner, he often assists him in his work. We would normally reimburse the expenses of someone aiding a reporter in such circumstances."

The newspaper's editor claimed that British agents destroyed an unspecified number of his newsroom's hard drives in an apparent attempt to keep Mr Snowden's leaked intelligence material safe from Chinese spies.

Alan Rusbridger made the claim in an opinion published to the newspaper's website, saying that two experts from GCHQ came to his office to oversee the process.

Mr Rusbridger did not explicitly say why GCHQ demanded the material's destruction, but suggested it was ordered to keep it out of the hands of "passing Chinese agents".

It was not clear exactly when the incident occurred.

Mr Rusbridger gave a vague timeline, suggesting that it happened within the past month or so.