Downing Street’s official denial that it played no behind-the-scenes role in the nine-hour detention of a Brazilian man at Heathrow airport was cast into doubt last night after a Washington official claimed the US was given a “heads-up” by the British government that “something was likely to occur”.

No 10 has so far refused to answer operational questions over the treatment of David Miranda, the partner of the Guardian journalist Glenn Greenwald, insisting that the decision to use UK anti-terror laws to question the Brazilian citizen had been taken by Scotland Yard.

Mr Miranda, 28, said that British customs officials had detained him for nearly nine hours – the maximum time permitted under schedule seven of the Terrorism Act 2000 – and forced him to reveal the passwords to his computer and mobile phone.

Download the new Independent Premium app Sharing the full story, not just the headlines

“They were threatening me all the time and saying I would be put in jail if I didn’t co-operate,” he told The Guardian. “They treated me like I was a criminal or someone about to attack the UK … It was exhausting and frustrating, but I knew I wasn’t doing anything wrong.”

Mr Miranda has been assisting his partner in making revelations linked to documents leaked by the US whistleblower Edward Snowden. During his trip to Berlin, Miranda visited Laura Poitras, the US film-maker who has been working with Mr Greenwald on the Snowden revelations. It was reported last night that Britain alerted the US authorities after Mr Miranda’s name appeared on a passenger manifest of the flight.

Published material from Mr Snowden concerning the operations of the US National Security Agency and its co-operation with Britain’s intelligence communications agency, GCHQ, has caused deep embarrassment to both governments.

Last night Scotland Yard defended the detention of Mr Miranda as “legally and procedurally sound”. A statement said: “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.”

The statement came after Keith Vaz, chair of the Home Affairs Select Committee, and the shadow Home Secretary, Yvette Cooper, both demanded that Scotland Yard explain why the UK’s anti-terror powers had been used to justify the airport detention. Greenwald’s partner was on his way to Brazil, after a meeting in Berlin with a US film-maker who has also been working with The Guardian on the Snowden revelations. The newspaper had paid for Mr Miranda’s flights.

The Met has refused to explain why Mr Miranda was stopped, why it held him for the maximum nine hours allowed in law, and why personal possessions such as his computer, phone and digital storage devices were taken from him.

The Home Office has also been silent, claiming it was down to the police officers at the airport to make the operational decisions that led to the detention and questioning by six officials. Although the Home Office claimed the operation was “Met-led”, security sources told The Independent that officers from MI6 may have been among those involved in the lengthy questioning of Mr Miranda.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

The matter was further complicated last night after a Washington official denied the US was involved in the decision to detain Mr Miranda but said it was given a warning by the British government that the obstruction was likely to occur. During a press conference at the White House, Josh Earnest, the deputy spokesman, said: “This was action taken by the British government and this was something that they did independent of our direction.

He added: “There was a ‘heads-up’ that was provided by the British government, so this was something we had an indication was likely to occur. But it is not something that we requested.”

David Davis, the former shadow Home Secretary, said ministers were using the excuse of national security to avoid questions on Mr Miranda’s detention. He urged Downing Street to reveal what it knew, claiming that the operational background must have gone beyond the control of the police.

The Met confirmed that it held a 28-year-old man at Heathrow between 8am and 5pm on Sunday under Schedule 7 and that the man had not been arrested. The Guardian said it was seeking clarification on the reasons for the detention. Liberty’s director, Shami Chakrabarti, said her organisation had already launched a challenge in the European Court of Human Rights over the use of Schedule 7.

Mr Greenwald accused the British authorities of bullying and intentional intimidation, linked to the Snowden revelations on the NSA. Mr Vaz has asked the Met to justify its use of anti-terrorism powers. He told the BBC: “I would not have expected it [the law] to be used in a case of this kind.” Ms Cooper called for an investigation to be made into whether or not terror powers had been misused against Mr Miranda.

Q&A: Your rights over Terrorism Act 2000

Q. Can the section of the Terrorism Act 2000 used to detain David Miranda be applied anywhere in the UK?

A. No. Schedule 7 of the 2000 law is supposed to give the police the authority to stop and question passengers at ports, airports and international rail terminals.

Q. Can you refuse to answer questions in this situation?

A. You can try, but if you fail to co-operate and are deemed to have obstructed questioning, then the law says you have committed a criminal offence which can carry a three-month jail sentence, a fine, or both.

Q. What would one need to have done to be detained and questioned under this law?

A. The police don’t need to tell you what they think you might have done. No grounds for their suspicion need be offered before questioning.

Q. How much information do you need to supply?

A. A lot. Questioning can legally last up to nine hours – and anything a police officer asks has to be answered.

Q. Presumably they’ll need a warrant to search my computer and tech stuff?

A. No, they don’t. All such property can be seized. Data from laptops and phones can be downloaded and retained.

James Cusick