The detention under anti-terrorism legislation of the partner of the Guardian journalist who exposed mass email surveillance by the US government has been widely condemned as unlawful.

Newspaper editors, human rights lawyers and civil liberties campaigners said David Miranda’s detention and questioning was a gross abuse of the Terrorism Act 2000, which despite its scope was never meant to be used as a licence for extracting information.

A pernicious feature of the act was that individuals were required to answer questions with no legal advice, targeting people at their most vulnerable, they said.

Gareth Peirce, a leading human rights lawyer who has been heavily involved in many cases under the 2000 statute, said: “However widely the authorities try to construe the act, and however widely they use and abuse its parameters, it was never meant to facilitiate an ambitious intrusion into the rightly protected work of investigative journalists.”

Miranda, 28, whose partner Glenn Greenwald has been working since May with the National Security Agency whistleblower Edward Snowden, was transiting in Heathrow en route from Berlin to Brazil on Sunday when he was detained and questioned for almost nine hours under schedule 7 of the Terrorism Act.

The Guardian paid for Miranda to travel to Berlin, where he met Laura Poitras, a US film-maker who has been also working with Greenwald and the paper. While in transit at Heathrow he was halted by police who confiscated his laptop, mobile phone, memory sticks, camera, DVDs and games consoles.

Shami Chakrabarti, the director of the civil rights group Liberty, said the detention “was possible due to the breathtakingly broad schedule 7 power, which requires no suspicion and is routinely abused”. She added: “People are held for long periods, subject to strip searches, saliva swabbing and confiscation of property – all without access to a publicly funded lawyer. Liberty is already challenging this law in the court of human rights but MPs disturbed by this latest scandal should repeal it without delay.”

The leading human rights lawyer Gavin Millar told the Guardian the police would have to prove that they had detained Miranda with the express intention of eliciting information about alleged terrorist activities, and not on a fishing expedition related to the Guardian’s journalistic activities or as means of intimidating Greenwald or the paper.

Keith Vaz MP, the chairman of the Commons home affairs committee, called Miranda’s detention extraordinary and demanded an explanation from the Met. It appeared counter-terrorism legislation was being used “for something that does not appear to relate to terrorism”, he said.

The National Union of Journalists described the detention “as a gross misuse of the law” and raised questions about the guarantees journalists could now give their sources. “Journalists no longer feel safe exchanging even encrypted messages by email and now it seems they are not safe when they resort to face-to-face meetings,” said the NUJ secretary general, Michelle Stanistreet.

Bob Satchwell, the executive director of the Society of Editors, which represents national and regional newspapers, said it was “another case of disproportionate reaction by authorities” using “an important piece of legislation for a purpose for which it was neither intended nor designed”.

He said: “Journalism may be embarrassing and annoying for governments, but it is not terrorism”. Satchwell said it was difficult to avoid the conclusion that “the detention of a journalist’s partner is anything other than an attempt to intimidate a journalist and his news organisation that is simply informing the public of what is being done by authorities in their name”.

“It is another example of a dangerous tendency that the initial reaction of authorities is to assume that journalists are bad, when in fact they play an important part in any democracy,” he said.

Jo Glanville, the director of English Pen, which campaigns globally for writers’ freedom of expression, said there appeared to be no explanation for Miranda’s detention and it therefore should be interpreted as an attack on the Guardian and on Greenwald. She called on the government to urgently account for ” the misuse of the Terroirism Act”.

The Metropolitan police said Miranda had been lawfully detained under the Terrorism Act and later released. “Holding and properly using intelligence gained from such stops is a key part of fighting crime, pursuing offenders and protecting the public,” it said in a statement.

Liberty said it had long argued that schedule 7 was ripe for misuse and discrimination. The organisation has a case pending at the European court of human rights challenging the power.

The case involves a British citizen of Asian origin who was detained at Heathrow for four and a half hours in November 2010. During his detention he was asked about his salary, voting habits and the trip he had been on, among other matters.

Copies were taken of all his paperwork and credit cards and the police kept his mobile phone, which was only returned to him eight days later and he had to pay for its return himself. He had never previously been arrested or detained and was travelling entirely lawfully, Liberty said.

• This article was amended on 20 August 2013. An earlier version misspelled Gavin Millar’s name as Gavin Miller.