– The white Chicago police officer who gunned down a black teenager in 2014 was sentenced Friday to nearly seven years in prison, bringing an end to a historic case that was centered on a shocking dashcam video and fueled national debates about race, policing and law enforcement’s “code of silence.”

Jason Van Dyke was convicted last year of second-degree murder and 16 counts of aggravated battery — one for each bullet he fired at Laquan McDonald.

Moments before learning the sentence, Van Dyke acknowledged the teen’s death, telling the judge that “as a God-fearing man and father, I will have to live with this the rest of my life.”

Judge Vincent Gaughan did not characterize Van Dyke’s decision to open fire, saying only that it changed both McDonald’s and Van Dyke’s families forever.

“That’s a shame,” he said. You can see the pain ... on both families ... This is not easy.” He also said he knew the sentence would not please anyone.

“I assume 100 percent of people will be disappointed.”

After the judge’s announcement, Van Dyke’s father said, “They threw him underneath the bridge.” His older daughter began crying and said “I want him home.”

Activist William Calloway said, “81 months is a slap in the face to us and a slap on the wrist for him,” referring to Van Dyke.

Earlier in the day, several black motorists testified that he had used a racial slur and excessive force during traffic stops in the years before the 2014 shooting.

One witness, Vidale Joy, said Van Dyke used a racial slur after pulling him over in 2005 and at one point put a gun to Joy’s head. He said Van Dyke “looked infuriated” and seemed “out of his mind.” Under cross examination, Joy acknowledged that he did not allege Van Dyke used a slur in his first accounts of the stop.

Another witness, Ed Nance, struggled to maintain his composure as he looked across the room to identify Van Dyke. Testifying about a 2007 traffic stop, he said the officer cursed and slammed him on the car’s hood, grabbed him by the arms and pulled him to the squad car.

Hours later, Van Dyke’s relatives tried to defend and humanize him, saying he’s a good father and husband who goes out of his way to help and who is not racist.

The issue of race has loomed over the case for more than four years, although it was rarely raised at trial. One of the only instances was during opening statements, when special prosecutor Joseph McMahon told jurors that Van Dyke saw “a black boy walking down the street” who had “the audacity to ignore the police.”

Friday’s testimony came a day after a different judge acquitted three officers accused of trying to conceal what happened to protect Van Dyke, who was the first Chicago officer found guilty in an on-duty shooting in a half century and probably the first ever in the shooting of a black person.

At the sentencing, McDonald’s uncle read a letter written from the slain teen’s perspective, telling the court that Van Dyke killed him without provocation.

“I am a 17-year-old boy, and I am a victim of murder,” Marvin Hunter said. “I am unable to speak in my own voice” because an officer “thought he would become judge, jury and executioner.”