Updated

A South Carolina woman who hid her pregnancy and buried her newborn son in her backyard after he died has pleaded guilty to unlawful neglect of a child.

Local news media outlets report 37-year-old Tara Lynn Ostrowski pleaded guilty on Thursday. She was sentenced to three years of probation, preceded by at least 60 days of inpatient drug treatment.

York County Chief Public Defender Harry Dest said Ostrowski hid her pregnancy out of fear. He said she had been abused by her husband for seven years, and that her plan had been to find a safe haven for the baby.

The news reports say Ostrowski gave birth in a bathroom. The baby died minutes later.

A coroner ruled the death a homicide. The baby tested positive for hydrocodone and methamphetamine.