The use by police of anti-terror laws to stop and search demonstrators at an east London arms fair was valid, the House of Lords has ruled.
Police used the powers at a demonstration in London
Five Law Lords unanimously rejected a civil rights group's attempt to challenge it as disproportionate.
Dozens of protesters were stopped during the event in September 2003. Two were arrested under the Terrorism Act.
Liberty brought the case for student, Kevin Gillan, 26, and a freelance photo-journalist, Pennie Quinton, 32.
Mr Gillan was protesting peacefully against the arms fair when he was stopped and searched under the Terrorism Act.
Ms Quinton was there to cover the event and was also stopped under the act.
Lord Bingham of Cornhill said: "It is an old and cherished tradition of our country that everyone should be free to go about their business in the streets of the land, confident that they will not be stopped and searched by the police unless reasonably suspected of having committed a criminal offence.
"So jealously is this guarded that it has become a constitutional principle. But it is not an absolute rule."
He said the anti-terrorist provisions of the 2000 act were among the exceptions to the rule.
The case was brought against the Metropolitan Police and former Home Secretary David Blunkett after protesters outside the Excel Centre, in the Docklands, were confronted by officers using special powers under the act.
Scotland Yard initially denied using the legislation but later admitted it had been used in some cases. During the four-day event, 144 people were arrested.
Liberty argued its action had unlawfully deterred members of the public from demonstrating peacefully, and the "draconian" powers were being used in a way never intended by parliament.
The Metropolitan Police said there had been sufficient safeguards to protect the public interest.
The anti-terrorist special powers could only be used to search a person "for articles connected with terrorism", and there was no evidence that they had been misused, police said.
The law lords backed the police position on Wednesday.
They upheld a November 2003 High Court ruling that the use of stop and search, and any consequent violation of human rights, was proportionate under the European Convention on Human Rights and justified in the light of the threat of terrorism.
During the High Court hearing, it was revealed that authorisations had been in force for the Greater London area continuously since 19 February 2001.
Police officers of the rank of commander and above can authorise searches under section 44 of the act, for a period of up to 28 days, if they obtain backing from the Home Secretary.
Today Lord Bingham said the exercise of the powers by public officials "must be governed by clear and publicly-accessible rules of law".