Sentences were imposed on two defendants who were accomplices to a man now serving a long prison term for shooting five Black Lives Matter protesters in the wake of the Minneapolis police killing of Jamar Clark.

Nathan W. Gustavsson, 23, was sentenced Wednesday in Hennepin County District Court to eight months in the workhouse, with credit for nearly two months of time served in jail after his arrest in connection with the shooting on Nov. 23, 2015, near the Fourth Precinct police station.

As part of his sentence after pleading guilty last month to felony second-degree riot and aiding an offender after the fact, the Duluth area man was put on probation for 10 years. He’s also been ordered to pay restitution totaling $1,900 to the people who were shot, with most of that going to 31-year-old Walter Hoskins, who was shot in the back and a leg.

Gustavsson can have the felony convictions reduced on his record to misdemeanors if he abides by the terms of his probation, which include a lifetime ban on possessing firearms.

Joseph M. Backman, 28, of Eagan, who had a riot charge dismissed — he was not near the shooter during the gunfire — admitted to being an accomplice after the fact, a gross misdemeanor. He was sentenced to 90 days of house arrest, had a one-year jail term stayed and was put on probation for two years. He’s also barred from possessing firearms, but only during his probation.

As part of the court record, Backman apologized to the shooting victims, saying, “I know I may not deserve your forgiveness, but I hope that one day you are able to find it in your hearts to grant it to me.”

The men were among a group accompanying Allen “Lance” Scarsella to the police station, where activists set up camp in protest of police killing Clark during a scuffle with two officers.

Protesters were wary of Scarsella, of Lakeville, who had made a video from an earlier visit to the police station and sent several racist text messages before the shooting. After protesters surrounded Scarsella and his cohorts, the group retreated and Scarsella fired eight shots and wounded five people. Scarsella, 25, was convicted in February of first-degree assault. He has 8½ years of prison time yet to serve.

Backman’s attorney, Alex DeMarco, told Judge Hilary Caligiuri his client might have saved Scarsella’s life because he drove the gunman from the scene. The fourth man in the group had all charges against him dropped by Caligiuri.