Police have paid compensation and apologised to the comedian and activist Mark Thomas after they admitted unlawfully searching him for looking "over-confident" at a demonstration.

The Metropolitan police stopped and searched Thomas after he gave a speech at a rally against the arms trade in 2007.

The police searched his shoulder bag and wallet for weapons, which they said could be used to cause criminal damage.

A police officer recorded on an official form that Thomas may have been carrying weapons as he had an "over-confident attitude". Nothing was found.

In January the European court of human rights ruled it was unlawful for police to use arbitrary stop-and-search powers against peace protesters and photographers under terrorism legislation. Kent police admitted conducting unlawful searches on 11-year-old twins and other activists at an environmental demonstration.

The Met promised to cite the unlawful search on Thomas when training officers. Thomas, 47, has campaigned for many years against the arms trade.

He gave the speech at a heavily policed protest against an arms fair in London Docklands in 2007. He was stopped by a constable from the Territorial Support Group as he entered a station to go home. The constable said he suspected he could have weapons "intended for criminal damage", adding that the station had already been attacked with paint.

The officer said his shoulder bag "may contain such items due to the over-confident attitude of Mr Thomas". He is also said to have told Thomas he "appeared to know what you were talking about" at the rally. The officer added: "If we only stopped and searched people who looked nervous and shifty and didn't stop the ones who looked over-confident you would be able to get one past us," according to legal papers lodged by Thomas, which were not disputed by the police.

The officer noted on the official document recording the reasons for the stop-and-search that Thomas was "believed to be an influential individual".

The comedian's photograph had been on a secret "spotter card" issued to officers to identify people considered to be potential troublemakers at a demonstration against the arms fair two years earlier.

The Met paid £1,200 for "falsely imprisoning" Thomas for 12 minutes. He said: "£100 a minute is slightly more than my usual rate. If over-confidence is a reason for a stop-and-search Jonathan Ross should never leave his house."

Thomas said he would donate some of the money to the Miscarriages of Justice Organisation. He will also use it to fund his next standup tour, saying advertising posters would contain a line thanking the police for their financial support.

In a letter to Thomas, Detective Chief Inspector Adrian Baxter of the Met's professional standards department said: "I would like to express my regret for the distress that you have suffered … and offer my unreserved apologies." The officer who carried out the search had received "formal words of advice".