Lacey Spears sentenced
Lacey Spears, 28, is seen in an undated photo from the Westchester County District Attorney's Office in Westchester, New York. Spears, a single mother in New York state who documented the medical struggles of her 5-year-old son on social media, is due to be sentenced on April 8, 2015. REUTERS/Westchester County District Attorney's Office

A mother convicted of killing her young son by slowly poisoning him with salt was sentenced to 20 years to life in prison by a New York court Friday.

Lacey Spears, 27, was convicted of second-degree murder in February. A court found that she had fed sodium into her son Garnett's feeding tube from infancy, which eventually led to his death in 2014. During Garnett's illness, Spears was active on social media, writing a blog about their life and her son's declining health, and regularly posting updates on Facebook and Twitter.

Her sentence was less than the maximum 25 years to life that she could have received for the killing.

State Supreme Court Justice Robert Neary said Spears’ crime was “unfathomable in its cruelty” and brought her son “five years of torment and pain.” But he said he was not imposing the maximum penalty of 25 years to life because “one does not have to be a psychiatrist to realize you suffer from Munchausen by proxy,” the New York Times reported.

Munchausen syndrome by proxy is a psychological condition that, in some cases, sees caregivers injure children in order to create a situation that requires or appears to require medical attention.

Prosecutors said that the level of planning involved in Spears' poisoning of her son -- which saw her move him to different states and seek treatment from different doctors for diseases that he never had -- showed that she knew what she was doing and had not lost contact with reality, the Journal News reported.

Assistant district attorney Doreen Lloyd said: "She continued to portray him as a sick child for her own bizarre need for attention.

"She used that feeding tube as a weapon to kill him," she added, according to a BBC report.

Spears did not testify at her trial, and showed no emotion as she was being sentenced. Her attorneys did not seek to use the condition as a defense at her trial, nor did the prosecution seek to claim that her actions were a result of the condition.

Following Spears' sentencing, defense lawyer Stephen Riebling said it was odd for the judge to bring it up because Spears "hasn't been diagnosed with any mental illness," NBC News reported.