Police surveillance of a peaceful protester was ruled unlawful today in a decison that lawyers say will change the way demonstrations and protests are policed.

Judges ruled that specialist ­surveillance units from the Metropolitan police had breached the human rights of Andrew Wood, an arms trade campaigner, when they photographed him and stored the pictures on a police database.

One judge said there were ­unresolved civil liberties questions about the way images were taken and retained in "the modern surveillance society". Lord ­Justice Dyson said there were "very serious human rights issues which arise when the state obtains and retains the images of persons who have committed no offence and are not suspected of having ­committed any offence".

The judgment is a blow to the Met, which has been criticised over the way it polices protests since last month's G20 ­demonstrations and the death of Ian Tomlinson.

Tonight, human rights lawyers said the ruling could force police to delete thousands of images of protesters stored on their database unless they have grounds for suspecting them of criminal activity.

Anna Mazzola, of the solicitors Hickman & Rose, said: "The judgment of the court of appeal should act as a stark ­warning to the Metropolitan police that the ­circumstances in which they can justify taking and retaining photographs of ­members of the public who have ­committed no crime is highly circumscribed."

The case follows an investigation by the Guardian, which revealed police have been targeting thousands of campaigners in surveillance operations and storing their details on a criminal intelligence database for up to seven years.

Parts of the ­Guardian's investigation, which included information obtained through the Freedom of Information Act, were submitted in evidence to the court of appeal.

Yesterday, Wood, who was represented by the human rights group Liberty and who was a member of the Campaign Against Arms Trade when he was photographed leaving a meeting in 2005, said he was delighted with the ruling. "The Human Rights Act is part of the essential checks and balances which help to ensure that we can properly participate in a democratic society without repressive state intervention," he said. "The police don't just uphold the law - they must abide by it."

The case went before the high court last year when judges ruled against Wood. But yesterday two of the three judges ruled in his favour, saying there had been a ­"disproportionate interference in the human right to privacy".

Dyson said: "The retention by the police of photographs taken of persons who have not committed an offence, and who are not even suspected of having committed an offence, is always a serious matter. The only justification advanced by the police for retaining the photographs for more than a few days after the meeting was the possibility that the appellant might attend and commit an offence … that justification does not bear scrutiny."

Lord Collins added that the substantial police presence which confronted the arms campaigners had a "chilling effect" on people who had been lawfully ­protesting. A third dissenting judge said the Met had acted reasonably.

The judgment does not ban specialist police cameramen, known as forward intelligence teams, but it does mean the long-term retention of their pictures must be justified on a case-by-case basis.

The photographs of Wood were taken in April 2005 as he emerged from the Millennium hotel, London, where he had attended the annual general meeting of Reed ­Elsevier plc, the parent company of Spearhead Exhibitions Ltd, which runs trade fairs for the arms industry.

He had gained access to the meeting by buying a share in the company. He has no criminal convictions and has never been arrested as a result of any campaigning activities.

Last night the Met said the ruling did not mean it was unlawful to use "overt surveillance", which it said was "truly valuable in public order policing".

Chief Superintendent Ian Thomas, the officer in charge of the Met's public order branch, said the police would continue to use surveillance. But he added that the judgment ­provided a "valuable set of guidelines".