CHARLESTON, S.C. (Reuters) - A former South Carolina state trooper will serve a total of five years behind bars for shooting and injuring an unarmed black driver during a 2014 traffic stop, an incident that added to the debate roiling the country over the treatment of black men by law enforcement officers.

Sean Groubert, who is white, shot motorist Levar Jones after stopping him in Richland County for not wearing a seat belt. Patrol car video of the incident showed Jones with his hands raised as he was shot.

Groubert, 34, was fired from the state Highway Patrol after the shooting and pleaded guilty last year to assault and battery of a high and aggravated nature.

Circuit Court Judge Casey Manning on Tuesday sentenced Groubert to 12 years’ incarceration but suspended the prison time to five years and gave him credit for the 17 months he has served in jail after pleading guilty. Groubert will have to serve his full sentence only if he violates probation after his release from prison.

Wearing a jail jumpsuit and shackled in chains at his sentencing hearing, in a Columbia courtroom, the former trooper apologized to Jones.

“I screwed up,” Groubert told Jones. “I pray that one day you’ll be able to come to peace with this and forgive me.”

Jones was shot on Sept. 4, 2014, less than a month after Michael Brown was killed by a white officer in Ferguson, Missouri, sparking days of racial unrest.

After being pulled over at a gas station, Jones exited his car and then reached back into it for his wallet when the state trooper ran for cover, shouted and fired his gun.

The dashboard video showed Groubert shooting at Jones four times as Jones, hands raised, backed away. A bullet struck Jones in the hip and he fell to the ground. Jones could be heard asking, “What did I do, sir? Why did you shoot me?”

Groubert handcuffed Jones and left him on the ground until an ambulance arrived.

“It took eight seconds,” Jones told Judge Manning at the sentencing, where he asked for the maximum sentence of 20 years for Groubert.

After the shooting, “I was treated like an animal being put in a cage,” Jones said.

Groubert sobbed in court as the video of Jones’ shooting played.

“I realize now that I misread body language,” Groubert told the judge.