The High Court dismissed a challenge headed by civil liberties group Liberty, which claimed that the Metropolitan Police Commissioner Sir John Stevens and the home secretary David Blunkett had been acting unlawfully when they authorised the police to use emergency anti-terrorism laws to stop and search dozens of demonstrators at the DSEi international arms fair in east London in September.
But the judges who made the ruling realised the wide public importance of their decision and immediately granted Liberty the right to appeal. The case is expected to be heard early in the new year.
Section 44 (S44) of the Terrorism Act 2000 allows police commanders to authorise officers to stop and search people and vehicles for articles that could be used in connection with terrorism in areas they believe to be high risk - whether or not the police have grounds for suspicion.
There is widespread concern that under the current political climate, the government is putting concerted pressure on the courts - making it difficult for them to rule against the anti-terrorist powers.
Some activists saw the ruling as part of the extra security measures that were put in place to protect George Bush on his three-day state visit to Britain last month. All police leave was cancelled in London, and armed US bodyguards and special agents were brought in to patrol the streets of the capital.
-If Liberty had won, it would have dealt a great blow to Bush's visit," said Simon Underwood, a Camden Stop the War activist who was stopped at the DSEi arms fair. "I wonder how much the outcome was linked to the need for police to control the protests over the state visit."
The Home Office said that the ruling "reinforces our message that the protection of the public and national security is the responsibility of our government and the police, and that neither can take risks".
Pennie Quinton, one of the protesters who brought the legal challenge, said: "The judgment was a shame. The case proved the anti-terrorism powers weren"t used to target terrorists, but to intimidate protesters. The police will continue to use S44 to harass, target and threaten protesters, and to gather intelligence on activists during searches."
The Metropolitan Police welcomed the High Court's endorsement of their use of S44 powers, but recognised the need to ensure the powers were not abused.
Pressure is mounting among protesters for a more high-profile campaign against this expansion of the powers of the state. "We need to plan our actions in challenging this in the courts, and draw links with young people who are being stopped and searched because of their race, or for antisocial behaviour," said Underwood.
Authorisations allowing the police to stop and search any member of the public at any time have been in force for the Greater London area continuously since February 2001. Between April 2001 and April 2002 more than 7,500 people in London were searched under S44.
These incidents accounted for 75 per cent of all the searches that took place in England and Wales in the period. But S44 has been used by almost every constabulary in the UK, and is routinely invoked to stop peace protesters outside the RAF base in Fairford, Gloucestershire.
Liberty director Shami Chakrabarti said: "Ultimately, the judges gave deference to the police and home secretary in national security issues. We will do our best to defend people's right to protest without fear of being branded -'terrorists-'."