Undercover police operations spanning decades may have led to wrongful convictions and miscarriages of justice, the Home Secretary has warned, in the wake of "profoundly shocking" findings of a major review into the Stephen Lawrence murder investigation.

A judge-led public inquiry is to be launched into the work of undercover police and Scotland Yard's Special Demonstrations Squad (SDS) - the top secret squad that was up and running for nearly 40 years.

Addressing the House of Commons on the findings of a major review of the Lawrence investigation by Mark Ellison QC, Theresa May said SDS officers' actions - such as failing to reveal their true identities to court or correct evidence they knew was wrong - meant there was "real potential for miscarriages of justice".

Stephen Lawrence, 18, a would-be architect, was stabbed to death by a group of up to six white youths in an unprovoked racist attack as he waited at a bus stop in Eltham with a friend on April 22 1993.

His father Neville Lawrence said the findings were "21 years overdue", while Prime Minister David Cameron and Labour leader Ed Miliband expressed their shock at Mr Ellison's conclusions.

Last June, former SDS officer Peter Francis claimed he had been deployed undercover from September 1993 and tasked to find out any intelligence that might be used to "smear" or undermine the Lawrence family campaign.

In his report, Mr Ellison, who successfully prosecuted Gary Dobson and David Norris for Stephen's murder in 2012, found that an SDS "spy" was working within the "Lawrence family camp" during the judicial inquiry led by Sir William Macpherson int o Stephen's death.

"The mere presence of an undercover Metropolitan Police officer in the wider Lawrence family camp in such circumstances is highly questionable in terms of the appearance it creates of the MPS (Metropolitan Police Service) having a spy in the family's camp," he said.

The undercover officer in question - referred to as N81 - was also found to have held a meeting with acting Detective Inspector Richard Walton, who had been seconded to the MPS Lawrence review team, responsible for making submissions to the Macpherson inquiry.

Mr Ellison branded this meeting "a completely improper use" of intelligence, adding: "We find the opening of such a channel of communication at that time to have been 'wrong-headed and inappropriate'."

The QC added that he felt "bound" to flag concerns about the wider implications of the findings on SDS activities - namely that the way in which the unit operated could have ultimately tainted criminal proceedings.

Mr Ellison said the nature of undercover work placed serving officers inside groups of activists who came into conflict with the police and faced arrest and prosecution.

He said: "Having a system whereby that activity was shrouded in almost total secrecy and the role of, and intelligence gained by, the undercover officer was not considered in relation to the prosecution's duty of disclosure in criminal proceedings must, in our assessment, produce the potential for there to have been unfairness in some of those proceedings."

The Home Secretary has commissioned Mr Ellison, along with the Crown Prosecution Service and Attorney General, to conduct a further review into cases impacted by the SDS and has launched a wider public inquiry into undercover policing and the actions of the squad.

"In particular, Ellison says there is an inevitable potential for SDS officers to have been viewed by those they infiltrated as encouraging, and participating in, criminal behaviour," she said. "We must therefore establish if there have been miscarriages of justice."

Mrs May also announced that she would bring in new legislation to create a specific offence of police corruption, to replace current "outdated" misconduct in public office.

In addition, Mr Ellison found there is evidence to suspect one of the detectives on the original Stephen Lawrence murder investigation - detective sergeant John Davidson - acted corruptly.

Both the Independent Police Complaints Commission 2006 report into corruption allegations and the Metropolitan Police's own review in 2012 were found to be inadequate by the review.

Mr Ellison added that Scotland Yard's record-keeping on its own investigations into police corruption are a cause of concern, with key evidence the subject of mass shredding in 2003.

A hard drive containing relevant data was discovered in November 2013 after more than a year of searching for it.

Mr Francis, who has made a number of allegations about the squad, including that its officers had sexual relationships on deployments and dead children's identities were adopted, said: "I am delighted by the Home Secretary's announcement today to set up a public inquiry into the work of undercover police officers.

"I have been calling for such an inquiry since October 2011.

"The public inquiry must investigate the work undertaken by police's Special Demonstration Squad and its undercover surveillance of political campaigns in general.

"It should not be limited in relation to time or particular issues. The truth about the tactics of undercover policing will only be revealed by way of a truly independent, public inquiry, which will require those involved to provide evidence under oath.

"When the full truth comes out about the police's work and activities, across the UK, against political campaigns and protests since 1968, I think they will be very shocked."

Commenting on the impact the findings of the Ellison review must have had on the Lawrence family and Stephen's friend Duwayne Brooks, deputy commissioner Craig Mackey, of the Metropolitan Police, said: "I understand that today they must feel that all the trust we have worked to build is shattered by what they have heard and read.

"As a police officer and a human being that's a terrible position to be in."

He said he was "saddened, shocked and very troubled by what the Home Secretary has said" and that corrupt officers could not "hide behind the veil of the past".

Mr Mackey said he will write to Mr Walton to ask for his notes. "There are concerning allegations but we must be fair to the individual concerned," he said. The senior officer called the SDS a "secret and insular unit that rarely documented its activity".