Political movements of Jenny Jones and Green party councillor Ian Driver were recorded, though neither have a criminal record

Two Green party politicians, including its candidate for mayor of London at the last election, have criticised police chiefs who recorded their political activities on a secret database that was set up to track campaigners deemed to be "domestic extremists". Neither politician has a criminal record.

Official files show that the police kept a log of the political movements of Jenny Jones, a London assembly member and peer, over an 11-year period while she sat on the official committee scrutinising the Metropolitan police and stood to be London's mayor.

They recorded a tweet she sent about possible police tactics at a pro-cycling protest, and details of public meetings she addressed about issues including police violence and Conservative cuts in public spending.

Jones and Ian Driver, who is a local councillor for the Green party in Thanet, Kent, have objected to the monitoring and have signed witness statements to support a lawsuit, to be heard later this year in the supreme court, which seeks to curb the clandestine database.

The pair used data protection laws to obtain files on themselves from the database, which police say is used to monitor activists who could use criminal methods to promote their political aims.

The domestic extremism unit, run by Scotland Yard, has been monitoring thousands of political activists in order, it says, to identify the hardcore minority who have broken, or are about to break, the law during protests.

Police started recording the political activities of Jones and Driver after they had been elected to office. The files refer repeatedly to the elected positions the pair have occupied.

Jones has held a series of posts in the capital's local government, including deputy mayor, since being elected to the London assembly in 2000. She stood against Boris Johnson for London mayor in 2012. Last year, she was made the Green party's only member of the House of Lords.

The file on Driver logs 22 occasions on which he helped organise public meetings and demonstrations about animal exports and gay marriage between June 2011 and June last year.

The database has attracted controversy, particularly as campaigners who had not committed any crime found themselves on it. One campaigner discovered that the police had monitored him while he was at the Glastonbury music festival. The Metropolitan police said that it would not be appropriate to comment as "there are ongoing legal proceedings".

The Met added that the domestic extremism database is maintained in accordance with a code of practice. It said it had recently deleted a large number of files on individuals after Her Majesty's Inspectorate of Constabulary found that there appeared to be no justification for keeping some records. The Met was unable to say how many elected politicians were on the database.

Jones said she had never been arrested, and all the information on her related to her work as an elected politician. The monitoring was unjustified and not a good use of police resources, she added.

Driver said the demonstrations he helped organised were "all peaceful and lawful", adding that he too has never been arrested and has never been "involved in planning, carrying out or supporting any illegal activities". The councillor, who was elected in 2011, added: "I am very upset and annoyed that I appear to have been spied upon for two years by the police when there was no good reason to do so."

The file on Jones, who has been a consistent critic of police misconduct and the use of undercover officers to spy on political groups, discloses how the police recorded her activities between 2001 and August 2012.

This covered a period that included her attempt to become London's mayor in May 2012.

Police recorded that "open source material" indicated that she "has tweeted that she, a Green party mayor candidate" was going to be attending a pro-cycling protest in August 2012 and was "concerned that she may be kettled by the Met".

Two entries record that she spoke at a public meeting and demonstration in May 2009 to object to the deaths of individuals in police custody and police tactics at protests, following the death of Ian Tomlinson.

Other entries record that she spoke at a conference to advance progressive policies in London in 2009, and protests against the arms trade and invasion of Iraq.

The pair are backing an 89-year-old Brighton pensioner, John Catt, who won a notable lawsuit against police last year.

The court of appeal ruled that the Metropolitan police had unlawfully logged on the database details of his presence at 55 protests between 2005 and 2009. His habit of sketching and drawing the scenes at demonstrations had been recorded. He too has no criminal record.

Police have lodged an appeal at the supreme court.