CHICAGO (CBS) — A northwest Indiana woman was sentenced to one day in prison, but avoided any actual time behind bars, after pleading guilty to involuntary manslaughter in the death of her newborn daughter on a Caribbean cruise four years ago.

Alicia Keir, now 24, admitted giving birth alone in a stateroom during an October 2011 cruise to St. Maarten, and never calling for medical help. She said, after the baby was born, she wrapped the child in a towel, and placed her under her bed. A cleaning crew found the body when the ship made port, and an autopsy determined the baby was born alive, and could have survived if she had proper care, according to court records.

U.S. District Judge Rudy Lozano sentenced Keir to one day in prison at a hearing on Wednesday, but granted her credit for time served, meaning she immediately began two years of supervised release. Keir could have faced up to eight years in prison.

Defense attorney Jeffrey Schlesinger had argued Keir only recently found out she was pregnant, and believed she was only six weeks along, and did not think she would give birth until long after the cruise ended.

“It was a mistake to go on the cruise and she compounded the mistake by not informing the family who had invited her as their guests that she was pregnant, again assuming that they would not find out during the cruise,” Schlesinger wrote in a sentencing memorandum.

Two days into the cruise, Alicia began to suffer severe cramps after her friends had fallen asleep, but at first she believed it was the result of overeating, according to Schlesinger’s filing. After realizing she was giving birth and delivering her baby daughter, Keir thought the baby had died.

“Alicia saw no movement and was unable to detect any sign of life from the baby. She used a razor to cut the umbilical cord and spent about an hour and a half to two hours in the bathroom with the baby, partly due to trauma and partly to see if she could see any sign of life,” Schlesinger wrote.

Keir, of DeMotte, admitted it was a mistake not to seek medical help, but said she did not mean the baby any harm.

“She was a young women [sic] who had never given birth before, giving birth alone in the bathroom of a cruise ship afraid to tell anyone what had happened. It was not her intent to cause the death of the infant. If it had been, it would have been much easier for her to dispose of the body rather than wrapping it in towels with the naive intent of returning the body to Indiana for burial,” Schlesinger wrote.

Schlesinger noted Keir had another child two years later, and has been a good mother.

He also noted it took federal prosecutors more than a year to inform her she was the target of a criminal investigation, and while plea agreements were offered before formal charges were filed, it was not until more than two years later that they filed charges.

“Despite living with the trauma of contributing the death of her child for almost four years and the possibility of a prison sentence for three years, Alicia has stabilized her life and matured greatly. She is presently a single parent of a healthy and loved daughter,” Schlesinger argued.

The Northwest Indiana Times reports the judge admonished her not to drink alcohol or take drugs while on supervised release; and to attend counseling sessions, report to her probation officer, and not commit any other crimes, or risk losing custody of her 2-year-old daughter.