Updated

A Vermont woman pleaded guilty Thursday to killing a social worker and three relatives she believed played a role in her losing custody of her 9-year-old daughter.

Jody Herring, appearing in a court near the state office building where social worker Lara Sobel was shot and killed two years ago, pleaded guilty to one count of first-degree murder and three counts of second-degree murder, as part of a plea deal, as one of her daughters teared up in court.

She had originally been charged with three counts of aggravated murder in the deaths of her relatives.

Sentencing will come at later date. The plea deal calls for a sentence of 20 years to life on the second-degree murder convictions, to be served concurrently. No sentencing has been set for the first-degree murder conviction. She could be sentenced to life without parole.

Defense attorney David Sleigh said the plea deal allowed Herring to avoid a conviction of aggravated murder, which would have resulted in a mandatory sentence of life without parole.

"So we have an opportunity to argue for a sentence that would allow her to be released on parole at some point," Sleigh said.

John Treadwell, an assistant attorney general, said the certainty of guilt in the plea agreement is of substantial value to the state, the victims and the community at large.

"The state believes that this is a fair and just resolution of the pending charges in this matter," he said. "In exchange for taking the mandatory life without parole sentence under aggravated murder off the table the state obtains four murder convictions and retains the possibility of seeking and retaining a life without parole sentence at the sentencing hearing."

Herring, 42, admitted shooting Sobel as Sobel left work on Aug. 7, 2015. She also admitted shooting cousins Regina Herring and Rhonda Herring, and her aunt Julie Falzarano at their home in Berlin, Vermont, earlier that day. Police said she believed her relatives had reported her to the Department for Children and Families.

Police said Herring shot Sobel twice with a hunting rifle outside an office of the state Department for Children and Families in Barre as Sobel, a 14-year employee at the agency, left work. Herring was tackled by bystanders and then arrested.

The next day, police were called to a home in the neighboring town of Berlin where they found the bodies of Herring's relatives.

Herring's competency has been an issue since the crime.

In the written plea agreement, Herring said that she has suffered from "significant mental health disease" over the course of her life but is not now.

___

This story has been corrected to remove a comment that Herring said she wished she were dead.