SKOWHEGAN, Maine — A Fairfield mother accused of murder in the death of her newborn son on Dec. 30, 2015, pleaded guilty Wednesday in Somerset County Superior Court to manslaughter in a plea agreement with the Maine attorney general’s office.

Kayla Stewart, 21, was sentenced to 15 years in prison with six years suspended, to be followed by four years of probation. She also was ordered to pay nearly $5,000 toward her son’s funeral expenses.

In a plea agreement with the Maine attorney general’s office, the murder charge was dismissed. The agreement called for Superior Court Justice Robert Murray to sentence her to between five and 25 years behind bars.

A sobbing Stewart told Murray she was sorry but did not say anything more.

Her parents, Randall and Lucy Stewart, along with childhood friends tearfully asked Murray to be lenient. All said that Kayla Stewart needed treatment for her mental health and substance abuse issues rather than prison time and needed to be reunited with her 3-year-old daughter.

Nicholas Blood, 26, of Fairfield and the father of both children attended the sentencing but did not address the court. He recently regained custody of his daughter.

His grandfather, Courtney Blood of Fairfield, said that the baby’s death “has been a great loss in our lives.”

Stewart’s attorney, Pamela Ames of Waterville, said at an impromptu press conference after the sentencing that the sentence was “fair.”

“Our main goal was to have her plead to what we believed the evidence could prove and that was manslaughter, it never was murder,” she said of her client’s decision to plead guilty to manslaughter.

Ames urged the judge to impose a five-year sentence. She said that her client believed the baby was dead when he was born and did not call 911 or seek medical attention for herself or her son.

Assistant Attorney General John Alsop said the plea agreement “was a fair way to go” rather than go to trial on the charge of depraved indifference murder. He recommended Stewart serve 20 years in prison.

Stewart has been held without bail at the Somerset County Jail in East Madison since her arrest on Jan. 22, 2016. She was indicted on one count each of murder and manslaughter in March by the Somerset County grand jury.

The remains of the baby boy, named Evan James Blood, were found Jan. 11, 2015, by police. He was wrapped in a blanket and trash bags, hidden under an oil tank in the detached garage next to the mobile home where Stewart lived in Fairfield, a police affidavit said. His umbilical cord was still attached. Blood-stained bedding, paper towels and plastic gloves were found in the garage near the oil tank.

Stewart shared the home with Nicholas Blood.

Ames said Wednesday that Stewart was alone in the garage when she gave birth to the baby.

The medical examiner determined that the child was full-term, born alive and healthy. The baby was either smothered or left to die in the cold without any kind of neonatal care, according to the court document. Fentanyl was found in the baby’s blood system and in the placenta, Alsop said Wednesday.

A DNA test determined that Blood most likely was the father of the baby boy. Blood has not been charged in connection with his son’s death.

In imposing the sentence, Murray said that “the brevity of Evan’s life and the circumstances of his demise in no way diminish the fullness of his humanity.”

The judge found mitigating factors to include Stewart’s age, her lack of a criminal history and her guilty plea. Murray said the aggravating factors included her drug use during the pregnancy and the impact her crime has had on her parents and friends as well as on her daughter, Blood and his family.

Stewart faced up to 30 years in prison on the manslaughter charge. If she had been convicted of murder, she would have faced between 25 years and life in prison.