BOSTON (CBS/AP) – The estranged husband of the former Massachusetts Senate president must register as a sex offender after he pleaded guilty to sexual assault charges Tuesday.

Bryon Hefner was set to go to trial Wednesday. Instead, he pleaded guilty to three charges including indecent assault and battery of a person over 14 and assault and battery and dissemination of a nude or partially nude person.

READ MORE: Martin Richard Foundation Holds 4th Annual MR8K Race In Boston On Saturday

The judge said Hefner could be sentenced to 12 and a half years in prison based on the charges against him but instead sentenced him to only three years probation. Along with registering as a sex offender, he was ordered to stay away from the victims and continue substance abuse treatment.

Prosecutors read statements from three victims about how the case deeply impacted them. The victims wished to remain anonymous.

“Bryon Hefner first sexually assaulted me on June 18, 2015 in a condo near the Statehouse that he shared with his husband. When he touched me a pit formed in my stomach as if my mind was retreating from my body and I immediately felt deeply violated, powerless, and repulsed,” one statement said, in part.

Bryon Hefner in Suffolk County Superior Court, Sept. 10, 2019. (WBZ-TV)

Hefner apologized to victims and his family in the courtroom. He also described his marital status as “separated.”

The charges Hefner pleaded guilty to stem from a series of incidents, including groping an acquaintance, kissing another against their will and taking, and distributing nude photos of a third — also without consent.

Six other charges were dismissed.

He was indicted by a grand jury in March 2018 on the charges after allegedly assaulting three men from 2014 to 2016.

The charges shook Beacon Hill and led to Rosenberg’s downfall.

READ MORE: Durham NH Police Searching For Missing 22-Year-Old UNH Student

When the allegations first surfaced in the Boston Globe in late 2017, Rosenberg, 69, said he would temporarily step down from his leadership post.

A scathing ethics report released in 2018 found that while Rosenberg did not formally violate Senate rules, he did violate the chamber’s information technology policies by giving Hefner “unfettered access” to Rosenberg’s Senate email account even before he became president in 2015.

That access only ended in March 2017 after Rosenberg staff members detected two instances of Hefner surreptitiously emailing two public officials as if he was Rosenberg, investigators said.

The report also said Rosenberg “knew or should have known Hefner had racially and sexually harassed Senate employees” and failed to address the issue adequately.

The release of the report prompted Gov. Charlie Baker — a Republican — and Attorney General Maura Healey — a Democrat — to call for the Amherst Democrat to resign from the Senate.

Rosenberg resigned the following day.

At the time, Rosenberg said he was leaving because he no longer had the authority to fully represent his constituents.

He noted the report found no evidence that he violated any Senate rules or was aware of any alleged sexual assaults by Hefner. But Rosenberg acknowledged findings in the report faulting him for not doing more to control Hefner’s access to information.

Democratic Sen. Karen Spilka was later elected to fill the post of Senate president.

MORE NEWS: Omicron COVID Variant Detected In Massachusetts Woman

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)