Updated

A Kentucky woman convicted of murdering her son by putting salt in his hospital feeding tube was sentenced Wednesday to 20 years to life in prison.

Lacey Spears, 27, was found guilty last month of second-degree murder in the 2014 death of her 5-year-old son, Garnett-Paul Spears, at a suburban New York hospital.

Acting 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 25 years to life because "one does not have to be a psychiatrist to realize you suffer from Munchausen by proxy."

He said he was offering "something you did not exhibit toward your son — mercy."

Munchausen by proxy, now known clinically as factitious disorder imposed on another, is a disorder in which, in some cases, caretakers purposely but secretly harm children and then enjoy the attention and sympathy they receive.

The judge said he hoped to shine a spotlight on the illness and encourage public reporting of it.

Prosecutors said the mother force-fed high concentrations of sodium through the boy's stomach tube because she craved the attention his illness brought to her, especially through her heavy posting on social media.

Her actions were "nothing short of torture," one prosecutor said. "The motive is bizarre, the motive is scary, but it exists."

The defense tried to blame the hospital, saying the boy was dehydrated while in its care. One defense lawyer said there was "no direct evidence" of a crime.

Spears' attorneys had refused to raise the disorder as a defense, and both sides agreed not to mention it at trial. After the 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."

Westchester County District Attorney Janet DiFiore said after the verdict, "This was not a close case. ... There was one conclusion to draw and that was that Lacey Spears murdered her child."

Garnett's feeding tube had been in place since infancy, when his mother told doctors he couldn't keep food down.

Days before his death, Spears brought her son to the hospital and reported he was suffering seizures. Doctors found him to be well until his sodium levels rose to extremes. The prosecution alleged Spears took the boy into a bathroom twice to push salt through the tube.

"Garnett Spears should be in school today, and he's not because his mother murdered him," prosecutor Doreen Lloyd told the judge.

Spears, an Alabama native, was living with her son in Chestnut Ridge, New York, when he died. She moved to Kentucky afterward and was living there when she was arrested.

Spears did not testify at her trial. Her lawyers have promised an appeal.

The Associated Press contributed to this report.