Two former Montgomery County corrections officers were sentenced Monday for their roles in assaulting two inmates, and one of them is heading to the jail he previously patrolled.

Darin Collins, 54, and Alfred Gregory, 35, appeared before County Court Judge William R. Carpenter in Norristown nearly three years after they attacked inmates Derrick Houlihan and Matthew Ruffings.

Both had been convicted in October after a contentious legal saga that included a retrial after a jury couldn’t reach consensus on charges some of their codefendants faced. Four other former prison guards were charged in the assaults, but were acquitted.

Gregory was found guilty of simple assault and official oppression, but the jury cleared him of more serious charges, including aggravated assault and reckless endangerment.

In a statement to Carpenter, Gregory said he believed his actions were justified. He said he used physical force to “keep individuals who I consider family safe.”

Video played during the trial showed that Houlihan, who wears a prosthetic leg, suffered two broken ribs, cuts, and bruises, and did not fight back.

Gregory’s attorney, Brendan Campbell, asked Carpenter on Monday for probation, but the judge sentenced Gregory to one to 23 months in the county jail, followed by two years’ probation. Carpenter said his decision was influenced by footage showing Gregory as the most brutal of the officers who attacked Houlihan, displaying conduct that he called “completely outrageous.”

“This is not your average simple assault conviction,” Carpenter said. “This is the assault by a prison guard of a one-legged man.”

Collins, a lieutenant at the time of the 2017 assaults, was sentenced to two years of probation. He, like Gregory, was found guilty of official oppression, and spared from more serious charges by the jury.

As a supervisor who worked his way up at the jail over 30 years, Collins was chastised by prosecutors for allowing the assaults to happen and for attempting to cover them up with inaccurate reports and conflicting statements to investigators.

First Assistant District Attorney Ed McCann, the lead prosecutor on the case, said Gregory and Collins showed little remorse for their actions even as they faced their sentences.

“They’re a stain on law enforcement, trying to wrap themselves in their badge and duty,” McCann said in court. “The truth is that by what they did here … people like Mr. Gregory make the job harder for everyone else.”

Houlihan, incarcerated at the county jail on a drug charge, was attacked inside his cell in February 2017, the day after he had an argument with Collins and other corrections staff about trash in an inmate common area, according to court documents.

He was punched and kicked by a group that included Gregory and Collins, who then took him to get medical treatment, but did not allow him to put on his prosthetic and forced him to hop on his one leg, according to a grand jury presentment in the case.

After being treated, and while being escorted back to his cell, Houlihan was grabbed by one of the guards, who tried to remove Houlihan’s bloodstained shirt and appeared to choke him with it. Other guards, including Gregory, then punched and kicked Houlihan on the ground, the presentment states.

The grand jury stressed that Gregory was “particularly aggressive," stomping on Houlihan with his full body weight and later kicking Houlihan’s prosthetic leg into another room.

Ruffings, who was awaiting trial on aggravated assault and gun offenses, told authorities that after he questioned an order by one of the officers who assaulted Houlihan, he was assaulted the next morning in his cell by a group that included Gregory and Collins. He suffered a broken nose and bruising to his face, according to court records.