A St Andrews University lecturer has been accused of being the undercover police officer who posed for years as an environmental activist and co-wrote a libellous leaflet that attacked McDonald's and triggered the longest civil trial in English history.

A book on undercover policing by Guardian journalists Paul Lewis and Rob Evans claims one of the authors of the so-called McLibel leaflet is former police officer Bob Lambert.

Dr Robert Lambert, who was not available for comment, is listed on the St Andrews website as having been a lecturer in terrorism studies since 2008.

It is claimed in the book, which is released on Monday, that Lambert co-wrote the defamatory six-page leaflet in 1986 - and his role in its production has been the subject of an internal Scotland Yard investigation for several months.

The authors claim Mr Lambert used the alias Bob Robinson during his five years infiltrating the London Greenpeace group, when he was with the special demonstration squad (SDS), a now-disbanded Metropolitan Police unit that targeted political activists.

McDonald's famously sued two green campaigners over the leaflet in a landmark three-year high court case, that was widely considered to have been a public relations disaster for the corporation.

It was not disclosed during the costly civil legal proceedings brought by McDonalds in the 1990s that an undercover police officer helped write the leaflet.

A raft of allegations have been made against undercover police in recent months including claims officers used dead children's identities and that some had sexual relationships with the targets of their operations.

Mr Lambert has also been accused by an MP of leaving a bomb in a Debenhams store in London in the 1980s to prove his commitment to animal rights extremists. He has denied that allegation.

An investigation into undercover policing, called Operation Herne, has been launched by the Metropolitan Police.

Derbyshire Police Chief Constable Mick Creedon was brought in to oversee the operation and recently confirmed it was ''common practice'' for undercover officers within the SDS to use dead children's identities.

A statement from the Metropolitan Police said the force "recognises the seriousness of the allegations of inappropriate behaviour and practices involving past undercover deployments".

It said: "Operation Herne is a live investigation, four strands of which are being supervised by the Independent Police Complaints Commission, and it would be inappropriate to pre-judge its findings.

"The Metropolitan Police Service must balance the genuine public interest in these matters with its duty to protect officers and former officers who have been deployed undercover, often in difficult and dangerous circumstances.

"We are therefore not prepared to confirm nor deny the identity of individuals alleged in the media to have been working undercover, nor confirm nor deny the deployment of individuals on specific operations.

"It is also important to recognise that any actions by officers working on or with the Special Demonstration Squad need to be understood by Operation Herne in terms of the leadership, supervision, support, training, legal framework, tasking and reporting mechanisms that were in place at the time.

"At some point it will fall upon this generation of police leaders to account for the activities of our predecessors, but for the moment we must focus on getting to the truth."

MP Keith Vaz said: "This is yet further evidence of the most disturbing practices used by undercover officers.

"Operation Herne has been ongoing for over 18 months and cost £1.25 million, but there have been no arrests or disciplinary procedures.

"It must be brought to a swift conclusion and apologies issued immediately to those like Helen Steel and David Morris whose lives were deeply affected by police spies.

"In particular, it is astonishing that the families of dead children whose identities were used and women duped into relationships and even having children with undercover officers have not yet even been informed this took place."

The St Andrews website says: "Since 2008 Robert Lambert has taught, lectured and supervised dissertations on the Centre for the Study of Terrorism and Political Violence (CSTPV) e-learning MLitt terrorism studies course.

"Lambert's twin research interests are community-based approaches to counter-terrorism and Islamophobia. Both topics are reflected in his book Countering al-Qaeda in London: Police and Muslims in Partnership published by Hurst in September 2011.

" In July 2011 Lambert took the CSTPV lead in a partnership with Dr Basia Spalek and Dr Laura Zara McDonald, University of Birmingham, founders of Police Community Engagement for Conflict Resolution (PCCT), a new collaborative hub developed with practitioners, community organisations and academics. International, independent and inclusive, PCCT aims to research, discuss and exchange academic and practice-based knowledge from all perspectives in relation to engagement in the counter-terrorism arena."

St Andrews University had no comment to make on the latest allegations.