An Iowa mother whose infant daughter died from asphyxiation after getting stuck between a mattress and a wall avoided prison time at her sentencing on Monday.

Polk County District Court Judge Jeffrey Farrell sentenced Michelle Atwell, 33, to two years of probation on Monday, fined her $1,000, and gave her a deferred judgment allowing her to strike her conviction from court records if she successfully completes her probation requirements, the Des Moines Register reported.

Atwell pleaded guilty in July to possession of a controlled substance with intent to sell.

Atwell and Matthew Cohara, 48, called authorities in August 2017 when they found their seven-month-old daughter not breathing. The baby became lodged between the bed and the wall and suffocated after Atwell placed her on the bed hours after feeding her, police said.

Police said the infant, Harper Dawn Cohara, was transported to a local hospital where doctors pronounced her dead.

Medical examiners conducted an autopsy, which found the baby had a cocaine byproduct in her system and she died of asphyxiation.

Atwell told officers she did a line and a half of cocaine in the bathroom, smoked pot out of an apple, and drank several bottles of beer before she fell asleep. She said awoke to the sounds of her daughter crying at 4:30 a.m. and went to nurse her.

When her daughter fell back asleep, Atwell went back to her bedroom. Cohara asked Atwell five hours later where their daughter was, and Atwell began to investigate.

The mother walked in to discover that only the top of her daughter’s head was visible while the rest of her body became trapped between the mattress and the wall. She called 911 and began performing CPR on the baby.

Authorities initially charged Atwell with child endangerment, narcotics possession with intent to deliver, marijuana possession, and other drug-related offenses, but the judge dropped the charges when Atwell pleaded guilty to the drug possession charge, the Daily Mail reported.