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: PHOTOS: ID Verification Company Shares Pics With CBS4 Of Costume Masks Worn By Unemployment Fraudsters

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: Stakeholders Considering Fees For 'Loved To Death' 14er Quandary Peak

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: Colorado Ranks 2nd Among U.S. States According To Survey Of Americans

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