DEDHAM (CBS) – A judge sentenced former Dedham Police officer Michael Schoener to 6-to-9 years in prison Thursday for his role in a 2014 deadly kidnapping in Avon. Schoener was convicted of accessory before the fact in the kidnapping of James Robertson.

Prosecutors had recommended Schoener receive 9-10 years, higher than the sentencing guideline of 3.5-5 years. The state argued that aggravating factors in the case, including Schoener’s position as a police officer, warranted a harsher penalty.

READ MORE: Brookline schools closed Monday, Educators Union plans to strike

Former Dedham Police officer Michael Schoener is sentenced on April 25, 2019. (WBZ-TV)

The maximum sentence was 10 years. Defense attorneys asked Judge Robert Cosgrove for Schoener to receive probation or 18 months, but Cosgrove opted for 6-9 years.

Robertson was 37 when he was kidnapped on New Year’s Day 2014 by two men passing themselves off as constables. They wore badges, carried guns, and claimed they needed to take Robertson for a random drug test related to his probation. Robertson was found about two years later murdered in the woods of Upton.

James Robertson. (Family Photo)

READ MORE: Celtics core group makes their statement with series win over Bucks

Prosecutors said Schoener handed over his police badge, holster, handcuffs and information about Robertson to his drug dealer before the kidnapping.

James Feeney, 48, of Dedham and Scott Morrison, 51, of Norfolk were convicted last October in the kidnapping and murder of Robertson.

“When I was young I admired police officers because they kept people safe by catching the bad guys. I never thought they could be the bad guys. I also never thought my dad would be kidnapped and murdered. I especially didn’t think a cop would be the one to help make it happen,” Robertson’s son Connor told the court during victim impact statements.

Schoener apologized in court Thursday.

“I will think about James, what happened, and what you guys are going through for the rest of my days,” Schoener said.

MORE NEWS: Grant Williams steps up with career game to lead Celtics to Game 7 win over Bucks

He will not go to prison immediately because the judge allowed him to remain free during the appeals process. That infuriated Robertson’s family, who were visibly upset as they left the courthouse.