A judge sentenced a South Carolina woman to 30 years in prison on Wednesday for murdering her toddler by feeding her a lethal amount of salt to attempt to get her estranged husband back.

The judge also ordered that Kimberly Martines, 25, of Fingerville, serve at least 85 percent of her sentence before she can be considered for parole, FOX Carolina reported.

Martines pleaded guilty to homicide by child abuse after she admitted to poisoning her daughter with the deadly amount of salt in July 2016.

The 17-month-old girl, Peyton, arrived at the hospital with acute salt poisoning from having elevated amounts of sodium in her blood. The baby suffered seizures and a high fever from the increased amount of sodium, the Daily Mail reported.

Doctors placed the baby on life support but later took Peyton off life support when the sodium overdose caused her brain to shut down. She died three days later.

Martines told investigators Peyton consumed the lethal amount of salt because the toddler and her twin sister pilfered a bag left unattended on a bookcase.

But her four-year-old son told a different story, divulging to officials that he watched his mother spoon feed his sister a tablespoon of salt.

Investigators discovered the bag of salt under a sofa cushion. Martines later told authorities she gave her daughter a lethal dose of salt “to get her husband back into her life” after she and her husband separated.

The woman said she chose to make Peyton her victim because she was nearby and easily accessible.