Bryon Hefner, the husband of former Senate President Stanley Rosenberg, on Tuesday changed his plea to guilty to three of the charges he faces in connection with a sexual assault and harassment scandal that roiled the State House last session.

Hefner was indicted in March 2018 in connection with his alleged sexual assault and harassment of men on Beacon Hill.

He had originally pleaded not guilty, and his trial was set to officially begin on Wednesday.

Hefner told Superior Court Judge Mary Ames he would plead guilty to charges of indecent assault and battery, assault and battery, and dissemination of a nude image.

The allegations raised against Hefner in late 2017 plunged the Massachusetts Senate into prolonged turmoil, leading to Rosenberg’s resignation, first as president and then from his legislative seat.

In court, Hefner listed his marital status as separated and said he had been employed in the culinary field for about a year.Ames told Hefner that prosecutors had “series of charging concessions” premised on his change of plea.