Bryon Hefner, the husband of former Senate President Stan Rosenberg, was sentenced to a year's probation on Monday in connection with hundreds of phone calls made while he was a patient at a Lincoln facility.

During an appearance in Concord District Court, Hefner pleaded guilty to four counts of making annoying phone calls and agreed prosecutors had enough evidence to convict him on two counts of criminal harassment, according to Middlesex District Attorney Marian Ryan's office. The phone calls, the DA's office said, were made to three numbers at a McLean Hospital facility in Lincoln, from Dec. 20, 2017 through Jan. 8, 2018, while Hefner was a patient there.

A staff member on Dec. 25 reported to police that the residential facility received about 50 prank calls that day between a landline and two cellphones. Prosecutors said police learned multiple staffers had been receiving similar calls from an automated caller, and an investigation found Hefner had been using websites that allow users to make automated prank calls to make the calls.

The case is separate from the sexual assault charges to which Hefner, 31, pleaded not guilty in April.

Rosenberg stepped down from the presidency last December, after Hefner was first accused of harassing and assaulting men with business on Beacon Hill and meddling in Senate affairs, and resigned his Senate seat in May. Rosenberg said in December that Hefner would seek professional help for alcohol dependence, including inpatient treatment. During his probation, Hefner will be forbidden from having contact with the victims or using prank call services, and he will be required to stay away from the Lincoln facility, to complete 50 hours of community service, and to comply with mental health treatment.