When British police detained David Miranda, the partner of journalist Glenn Greenwald, at Heathrow airport in August 2013 they breached his fundamental rights, said the country's Court of Appeal on Tuesday in a landmark ruling that will force the UK to re-examine its anti-terror legislation.
The court also rejected the UK's government's definition of terrorism as too broad.
Miranda was stopped and questioned for nine hours while he was carrying encrypted files containing material from the US National Security Agency whistleblower Edward Snowden.
His files were seized without the prior judicial authorization that would have been required outside an airport.
Miranda brought a case challenging the legality of his detention under schedule 7 of the UK's Terrorism Act, which allows for travelers to be stopped and questioned if they appear to be terrorists, with no right to remain silent or get legal advice. He said the counter-terror powers infringed on individual rights.
Thrilled with the court ruling! My purpose was to show UK's terrorismlaw violates press freedoms. And journalism isn't "terrorism." We won!
— David Miranda (@davidmirandario) January 19, 2016
About 60,000 people a year are held under this legislation in the UK, with the government arguing this is necessary in order to be able to check up on passengers when there is not enough evidence to warrant arresting them.
A lower court dismissed Miranda's challenge last December. But on Tuesday the Court of Appeal allowed part of it, saying that schedule 7 failed to provide effective protection for the basic rights of journalists and those working with them, and as such was incompatible with the European Convention of Human Rights.
Huge win in UK Court: holds Terrorism Act violates fundamental rights due to no protections for journalists, rejects— Glenn Greenwald (@ggreenwald) January 19, 2016
Freedom of expression must be protected, it said, meaning anti-terror legislation should not allow for journalists or their assistants to have their materials seized.
The court dismissed Miranda's argument that the use of the stop power against him was "an unjustified and disproportionate interference," saying police had acted lawfully by using schedule 7, and were right to detain him on security grounds. But it said schedule 7 itself was unlawful when it was used on people carrying out journalistic activity, in so far as it did not provide safeguards to protect confidentiality.
"The central concern is that disclosure of journalistic material (whether or not it involves the identification of a journalist's source) undermines the confidentiality that is inherent in such material and which is necessary to avoid the chilling effect of disclosure and to protect [freedom of expression] rights," said the Court of Appeal's most senior judge Lord Dyson MR.
"If journalists and their sources can have no expectation of confidentiality, they may decide against providing information on sensitive matters of public interest. That is why the confidentiality of such information is so important."
'The notion of a journalist becoming an "accidental terrorist" has been whole-heartedly rejected'
The court instructed British parliament "to decide how best to provide such a safeguard." The ruling also rejected the definition of "terrorism" used by the government and police, which is broad enough to include people involved in lawful activity who inadvertently put lives at risk.
The court said this was wrong, and terrorism had to require intention to endanger public safety.
If the government had meant to legislate "that a person commits an act of terrorism where he unwittingly or accidentally does something which in fact endangers another person's life, I would have expected that, in view of the serious consequences of classifying a person as a terrorist, it would have spelt this out clearly," said Lord Dyson.
"As a result of this ruling the law will have to be changed so that journalists are better protected," said a statement from Bindmans LLP, the law firm that represented Miranda.
The notion of a journalist becoming an "accidental terrorist" has been whole-heartedly rejected, said Kate Goold, from Bindmans.
"Today's ruling emphasizes the importance of interpreting terrorism with its ordinary natural meaning to ensure that legitimate public interest journalism is not stifled through the use of draconian powers because of the fear of remote consequences," Goold added.
Her colleague, John Halford, also part of the Bindmans legal team, said: "In short, this court has decided that taking effective action against terrorism involves using instruments that are fit for purpose, rather than those that are so blunt that they inevitably damage the interests of democratic societies based on free speech and the journalists that are their champions."
Follow Miriam Wells on Twitter: @missmbc