A former South Carolina police officer pleaded guilty on Tuesday as part of a deal in the 2015 fatal shooting of an unarmed black man.

Michael Slager pleaded guilty to using excessive force in the April 4, 2015, shooting death of 50-year-old Walter Scott.

Slager entered his guilty plea in U.S. District Court in South Carolina to a single federal charge of deprivation of rights under color of law. In court, he admitted he did not shoot Slager in self-defense — something he had originally argued.

As part of the plea deal, state murder charges and two other federal charges will be dismissed.

Slager had stopped Scott's vehicle after observing a non-working brake light. Scott then fled on foot. Slager pursued him, and then used his Taser on Scott, who fell to the ground before getting up and running away again.

Slager than fired eight shots at Scott as he ran; five hit him and killed him.

The entire interaction was caught on video by a bystander and sparked nationwide protests during a string of high-profile racial police brutality cases.

"The Department of Justice will hold accountable any law enforcement officer who violates the civil rights of our citizens by using excessive force," said Attorney General Jeff Sessions in a statement. "As our department works to support the courageous and professional law enforcement personnel who risk their lives every day to protect us, we will also ensure that police officers who abuse their sacred trust are made to answer for their misconduct."

Slager will be sentenced later this year. He faces a maximum penalty of life in prison and a fine of up to $250,000.

Slager had faced state murder charges, but a judge declared a mistrial in December after the jury failed to reach a verdict.

"We hope that Michael's acceptance of responsibility will help the Scott family as they continue to grieve their loss," Andrew J. Savage III, Slager's attorney, said in a statement.