British officials gave their US counterparts a “heads up” before detaining the partner of the journalist who first reported secrets leaked by fugitive US intelligence agency contractor Edward Snowden, the White House said today.

But American law enforcement officials did not ask British authorities to question journalist Glenn Greenwald’s partner, David Miranda, the White House said.

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

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

British authorities came under pressure today to explain why anti-terrorism powers were used to detain for nine hours the partner of Guardian journalist Glenn Greenwald who has been publishing information leaked by former National Security Agency contractor Edward Snowden.

Mr Miranda (28) is a Brazilian citizen and was detained by the British authorities yesterday under a counterterrorism law while as he changed planes at London’s Heathrow Airport on a journey from Berlin to his home in Brazil. He was released without charge.

Senior British Labour MP Keith Vaz is to write to the Metropolitan Police to seek clarification on why Mr Miranda was held and questioned.

David Miranda has spoken of being questioned by six agents on his “entire life” while travelling through Heathrow airport.

Arriving at Rio de Janeiro airport, 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 Miranda, Mr Greenwald said, was told that he was being detained under Section 7 of the British Terrorism Act, which allows the authorities to detain someone for up to nine hours for questioning and to conduct a search of personal items, often without a lawyer, to determine possible ties to terrorism. More than 97 per cent of people stopped under the provision are questioned for under an hour, according to the British government.

The UK’s Labour party urged the authorities to explain how they could justify using Schedule 7 to detain Miranda, arguing any suggestion that anti-terrorism powers had been misused could undermine public support for those powers. “This has caused considerable consternation and swift answers are needed,” said Labour lawmaker Yvette Cooper, the party’s spokeswoman on interior affairs, in a statement.

The British home office said the detention was an operational police matter. The police declined to provide any details beyond confirming the detention. “Schedule 7 forms an essential part of the UK’s security arrangements. It is for the police to decide when it is necessary and proportionate to use these powers,” a home office spokesman said.

“What’s amazing is this law, called the Terrorism Act, gives them a right to detain and question you about your activities with a terrorist organization or your possible involvement in or knowledge of a terrorism plot,” Mr Greenwald said. “The only thing they were interested in was NSA documents and what I was doing with Laura Poitras. It’s a total abuse of the law.”

He added: “This is obviously a serious, radical escalation of what they are doing. He is my partner. He is not even a journalist.”

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 (US National Security Agency) and 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.”

London’s Metropolitan Police Service, which had jurisdiction over the case, said in a written statement that Miranda had been lawfully detained under the Terrorism Act and later released without going into detail.

“Holding and properly using intelligence gained from such stops is a key part of fighting crime, pursuing offenders and protecting the public,” the statement said.

The Guardian published a report on Miranda’s detainment yesterday afternoon. Greenwald said he received a call early yesterday from someone who identified himself as a security official from Heathrow Airport who informed him that Mr Miranda had been detained, at that point for three hours. The British authorities, he said, told Mr Miranda that they would obtain permission from a judge to arrest him for 48 hours, but he was released at the end of the nine hours.

Mr Miranda was in Berlin to deliver documents related to Mr Greenwald’s investigation into government surveillance to Ms Poitras, Mr Greenwald said. Ms Poitras, in turn, gave Mr Miranda different documents to pass to Mr Greenwald. Those documents, which were stored on encrypted thumb drives, were confiscated by airport security, Mr Greenwald said. All of the documents came from the trove of materials provided to the two journalists by Snowden.

The British authorities seized all of his electronic media - including video games, DVDs and data storage devices - and have not returned them, Mr Greenwald said. A spokesman for the British Foreign Ministry said the episode was a “police matter” and would provide no further comment. Civil rights groups in Britain have criticized Section 7 of the Terrorism Act, accusing the authorities of using the provision to arbitrarily stop and detain travellers, particularly Muslims. The British Home Office has said it is reviewing the provision in an effort to address the concerns.

A lawyer for The Guardian in London was working on trying to understand what had happened, as were foreign-affairs officials for Brazil both in that country and in London, Greenwald said. He said he received a call from the Brazilian foreign minister about 40 minutes after alerting the Brazilian government, and that the Brazilian authorities were outraged.

Sergio Danese, the undersecretary for consular affairs at Brazil’s Foreign Ministry, said Brazil’s consul general and embassy officials in London had worked to resolve the situation. In a statement, the Brazilian Foreign Ministry expressed “grave concern” about the incident, which it said was “without justification” since there could be no “legitimate” accusations that Mr Miranda fell under the Terrorism Act.

PA/NYT/Reuters