An ex-police officer has admitted violating the civil rights of a black man he was filmed shooting to death, in a case that sparked a national outcry.

Michael Slager, who is white, could face decades in jail despite the state dropping the murder charge in a deal.

Walter Scott was killed after Slager shot him in the back five times in North Charleston, South Carolina.

A bystander filmed the 2015 incident on a mobile phone camera and Slager's actions were widely condemned.

It came as the US grappled with a series of police killings that sparked a debate about the use of force against African Americans.

Slager was fired by the force shortly after the video came to light.

The incident was viewed millions of times online, and led to calls for the officer to face severe punishment.

The plea deal does not carry a specific punishment, so Slager could face no prison time or life behind bars.

Image copyright Reuters Image caption Slager testifies during his earlier trial

He entered a guilty plea in front of his family, Scott's relatives and about 50 people who had gathered in the court.

As part of the plea, he admitted to deprivation of rights under the colour of law, lying to state investigators, and using a firearm in a violent crime.

"Today is a victory for Walter," said Judy Scott, Walter Scott's mother.

"We got justice," she continued, adding that she forgave Slager for her son's death.

Andy Savage, a lawyer for Slager, said: "We hope that Michael's acceptance of responsibility will help the Scott family as they continue to grieve their loss."

Media playback is unsupported on your device Media caption The dash cam footage shows Walter Scott's car being pulled over and Officer Michael Slager asking for his paperwork before Mr Scott runs away

Slager had maintained that he shot Scott after he had taken his stun-gun during a tussle that broke out after he pulled over Mr Scott for having a broken tail light.

An earlier murder trial in the state court ended in mistrial.

In March, a judge ruled that jurors could view the video, despite Slager's defence team trying to prevent that.

Image copyright Reuters Image caption Security outside the courthouse escort Slager (centre) to trial

The plea deal makes no reference to Walter Scott's race.

"The defendant wilfully used deadly force even though it was objectively unreasonable under the circumstances," according to the plea agreement.

"The defendant acknowledges that during the time he used deadly force, he knew that the use of deadly force was unnecessary and excessive, and therefore unreasonable under the circumstances."

Slager's sentence is not expected to be handed down for several more weeks.