The mother of the newborn baby, who was found alive in a dumpster in Boca Raton, Florida, on Wednesday, was taken into custody Thursday evening.

According to the Palm Beach County Sheriff's Office, the baby was rescued from the dumpster after two people walking in the area heard an infant crying. Sheilla Dominique, a witness, said she saw a maintenance worker carrying the baby.

“They saw the baby. He heard the baby crying, and they took the baby, and I guess they called for help. Then the EMS truck came and run with the baby. From what I heard, the baby is going to be fine,” she said, Fox-affiliated television station WSVN reported. “I think there was dirt all over the baby. We don’t know for how long the baby was in the dumpster. I don’t know, but it’s sad.”

Chanel Jonas, a resident in the area, said he heard the baby crying but thought it was her neighbor’s child.

“I wasn’t really sure. I thought it was my neighbor’s baby. I didn’t really know it was coming from the dumpster. I didn’t think anything negative. It was just like I hear babies cry every morning when I leave to go to work,” Jonas said, adding, “I’m happy to hear that the baby was still alive and that the baby is safe and sound.”

Paula Scorpio, another resident, said, “It’s horrifying that somebody would do something like that. That would be my grandchild. I don’t know what possesses people to do anything like that. That’s horrible. I can’t imagine a woman being that desperate.”

This image shows a pair of handcuffs at the Commissariat de Police Nationale (National Police Station) in Alfortville, France, Nov. 21, 2016. THOMAS SAMSON/AFP/Getty Images

The mother, Rafaelle Alessandra Carbalho Sousa, was detained Thursday afternoon for interrogation and sent to the Palm Beach County Sheriff's Office after medical clearance for further questioning. During interrogation, Sousa reportedly admitted to delivering the infant girl, placing her in a bag and throwing her in the dumpster. She was charged with attempted felony murder and child abuse and booked into jail Thursday evening. Sousa was scheduled to appear in court Friday, NBC-affiliated television station WPTV reported.

The Palm Beach County Sheriff’s Office was investigating the incident. Before arresting the mother, the officers reportedly went door to door asking questions.

“The baby’s ethnicity is either Black or Hispanic. She weighs 6 lbs. and 8 ounces and according to our Lieutenant, 'cute as a button'! Detectives are still actively seeking any information that anyone may have in relation to this case. If you know anything, please come forward,” the Sheriff’s Office tweeted at the time.