BOSTON (CBS) – A mother accused of dumping her newborn baby in a Dorchester trash can appeared in court Monday afternoon. Marie Mercier is charged with attempted murder and the reckless endangerment of a child.

Prosecutors said the 33-year-old was cooking or cleaning at a home in Dorchester on Friday and was pregnant when she arrived.

READ MORE: Pittsburgh Parks Conservancy Brings Back 'Picnic In Your Park' Event For June

Witnesses told police she went into the bathroom for more than an hour and they heard a baby crying. She allegedly came out with a leather bag and refused help.

Prosecutors say video from a pizza shop nearby shows her reaching into the bag, taking out a plastic bag and putting it in a trash barrel.

READ MORE: Pittsburgh Public Schools Plans For In-Person Commencement Ceremonies

The baby, a boy, was inside the plastic bag. A woman heard crying from the trash can and alerted EMS who brought the baby to the hospital. The baby is doing well.

Police say when they confronted Mercier, she initially denied any involvement but then told them she thought the baby was dead.

MORE NEWS: Pittsburgh Mayor Bill Peduto Signs Executive Order Targeting Tax Fraud

The defense says mental health issues and postpartum depression may play a role in this case.