Bryon Hefner, the estranged husband of former State Senate President Stan Rosenberg, pleaded guilty Tuesday to three charges — indecent assault, assault and battery, and dissemination of pornographic materials without consent.

Hefner, 32, reached a plea bargain with state prosecutors, avoiding a trial on those three charges plus six additional charges of sexual assault and related crimes. He was sentenced to three years probation plus one year of a suspended sentence in addition to substance abuse treatment.

In April 2018, Hefner pleaded not guilty to all charges, and the case was set to go to trial tomorrow in Suffolk Superior Court.

Seated before Massachusetts Superior Court Justice Mary Ames, Hefner listened to a state prosecutor's account of the three crimes to which he pleaded guilty: groping an acquaintance without consent, kissing another against their will, and taking and disseminating nude photos of another acquaintance who had been intoxicated without their consent.

Asked if those accounts were accurate, Hefner answered "yes."

Hefner will be required to register as a sex offender.

News broke of Hefner's misconduct in a November 2017 Boston Globe article that detailed four men's allegations against him, three of whom said Hefner groped them — two said the assault was repeated — and one of whom said Hefner forcibly kissed him. Days later, his husband, Rosenberg, resigned from his position as Senate president, but did not immediately vacate his seat as a state senator.

In May 2018, a probe from the Senate Ethics Committee found that Rosenberg failed to protect the state Senate from Hefner's influence and had given his husband inappropriate access to his office. Rosenberg, who was Massachusetts' first openly gay Senate leader, subsequently resigned his seat, ending a decades-long political career.

After Ames accepted the plea agreement, a prosecutor read impact statements from the three victims — all three of whom remain unnamed in court documents and proceedings — of each crime to which Hefner pleaded guilty.

One wrote that Hefner had more victims than identified in the charges against him and that Hefner committed crimes "knowing he would face no consequences."

The victim also described having been personally assaulted by Hefner multiple times — alleged incidents with which Hefner has never been charged, and which Ames said she could not consider in sentencing.

One of those alleged incidents, the victim wrote, took place in Rosenberg's car while "the three of us were driving from one political event to another."

In sentencing Hefner, Ames called his crimes "egregious" and agreed with victim impact statements that the crimes "are about exerting power."

Ames also noted that Hefner has made progress in his recovery efforts for alcoholism and said Hefner "seems to have begun the journey" toward redeeming himself.

Hefner addressed the court briefly, apologizing to his victims and to his family.

WGBH News' Kaitlyn Locke contributed to this report.