Rights group Amnesty International has accused British authorities of "unwarranted revenge tactics" after the partner of a journalist responsible for publishing US surveillance revelations was detained for nine hours.

Metropolitan Police confirmed David Miranda, husband of Guardian journalist Glenn Greenwald, was held at London's Heathrow Airport.

He was passing through on his way home to Rio de Janeiro from Berlin.

"A 28-year-old man was detained at Heathrow Airport under Schedule 7 of the Terrorism Act 2000," a police spokesman said.

"He was not arrested. He was subsequently released."

Mr Greenwald analysed and published information on documents released by former US security operative Edward Snowden, which revealed mass surveillance programs by the US National Security Agency (NSA).

Amnesty International said Mr Miranda was "clearly a victim of unwarranted revenge tactics".

"It is utterly improbable that David Michael Miranda, a Brazilian national transiting through London, was detained at random, given the role his husband has played in revealing the truth about the unlawful nature of NSA surveillance," Widney Brown, senior director of international law and policy at Amnesty, said.

"David's detention was unlawful and inexcusable.

"He was detained under a law that violates any principle of fairness and his detention shows how the law can be abused for petty vindictive reasons."

Officials confiscated some of Mr Miranda's electronic equipment including his mobile phone, laptop, camera, memory sticks, DVDs and games consoles, according to the Guardian.

"We were dismayed that the partner of a Guardian journalist who has been writing about the security services was detained for nearly nine hours while passing through Heathrow airport," a spokesperson for the paper said.

"We are urgently seeking clarification from the British authorities."

The Brazilian government also expressed "grave concern" about the incident.

A statement from the foreign ministry in Brasilia said its embassy in London contacted British officials prior to Miranda's release and that Brazil would also be seeking an explanation from US officials about the incident.

Former NSA contractor Mr Snowden received asylum in Russia on August 1, after spending more than five weeks stranded in a Moscow airport avoiding extradition to the US.

He is wanted by Washington on espionage charges linked to his media disclosures about the secret details of US surveillance programs.

AFP