COLUMBIA, S.C. (AP) – A former South Carolina Highway Patrol trooper who shot an unarmed man during a traffic stop in 2014 has been sentenced to more than three years in prison.

Circuit Judge Casey Manning on Tuesday sentenced Sean Groubert to five years in prison and three years of probation for shooting Levar Jones in the hip after stopping him for a seat belt violation in Columbia.

Groubert was given credit for 17 months he served after pleading guilty to aggravated assault and battery last year. Dashcam video shows Groubert shot Jones as he reached into his truck to get his driver’s license.

Groubert said he thought Jones was getting a gun.

Groubert is white and Jones is black.

Groubert apologized, saying that he made a mistake and Jones did nothing wrong.