People taking part in demonstrations must accept they could be searched by police, a court has ruled.

David Howarth, from the West Midlands, was searched on a train while on his way to a protest at Coryton oil refinery in Essex.

Lawyers for the human rights group Liberty argued his privacy had been invaded.

But two judges said the police action was "necessary and proportionate".

Mr Justice McCombe, sitting with Lady Justice Hallett, said there was a "significant danger" of the law becoming "over precious about minimal intrusions into privacy" during police searches.

Alleged indirect infringements of the right to privacy and freedom of expression were "the price" of taking part in mass public demonstrations, he said.Nothing found

About 50 Metropolitan Police officers boarded a train going to a climate change protest at the refinery on 16 October.

The case arose after protesters, alerted by a website, gathered at three railway stations in central London in preparation to move on to a series of oil industry targets, the court was told.

The protest had been organised by a band of activists calling themselves "Crude Awakening".

Police used powers under the 1984 Police and Criminal Evidence Act (Pace) to search for chalk and treacle which could be used to cause criminal damage.

Mr Howarth, from Cradley Heath, was given a "pat down" search, and his jacket and trouser pockets were also searched. His wallet was opened but the search officer did not look into it, the court heard.

Nothing was found on him and he went on to join 200 other protesters blockading the refinery.Law 'over precious'

Liberty was seeking a ruling that the search was unlawful and violated his rights under the European Convention on Human Rights.

Rejecting her submissions, the judge ruled the police officer who searched Mr Howarth did reasonably suspect prohibited items would be found on one or more of the protesters.

"The rights of expression and of assembly protected by the (Human Rights) Convention are indeed precious in a democratic society," he said.

"However, there is a significant danger of the law becoming 'over precious' in a rather different sense, about minimal intrusions into privacy and alleged indirect infringements of the rights of privacy, assembly and expression.

"These are the price today of participation in numerous lawful activities conducted in large groups of people," he added.