(CNN) — A newborn baby is in stable condition after people looking through a dumpster found the infant and called authorities, said the acting police chief in Hobbs, New Mexico.

Two men and a woman called 911 late Friday and reported they had found a baby. The group told officers they had been going through a dumpster looking for anything of value when they heard what they thought was a baby crying and removed a black trash bag and found the baby inside, authorities said.

The woman in the group held the boy, trying to keep it warm, while one of the men called police, Chief August Fons said at a Monday news conference.

“We just a found a baby in the trash,” a man can be heard saying in a 911 call audio, according to local news station KRQE.

“He’s freezing cold and he’s… very, very, very weak,” a woman is heard saying in the call, according to KRQE.

The group’s “collective quick response to this emergency, including notification of 911, was absolutely pivotal in saving this baby’s life,” the chief said.

The baby was taken by an officer and given to EMS personnel and transferred to a local hospital before being airlifted to a medical facility in Lubbock, Texas. The baby is in stable condition, Fons said.

Investigators looked through surveillance footage from a nearby store and saw a white vehicle pulling up to the dumpster around 2 p.m. that day and a young woman exited the vehicle, removed a black trash bag from the car and threw it in the dumpster before driving away, Fons said.

The baby was in the dumpster for about six hours before being found, he added.

The 18-year-old mother was charged with attempted first-degree murder and alternatively, felony abuse of a child, Fons said. She was arrested and processed into jail on Saturday evening and released shortly after. An attorney representing the young woman said that “whatever happened is already a tragedy for her family and the community.”

On Wednesday, a judge ordered that the young woman be put under house arrest with a GPS monitor and that she not be allowed to leave her parents’ home except for legal appointments, religious worship, medical needs and education. Her attorney said the accused is a high school student.

The young woman voluntarily met with detectives during their investigation and told them that she was unaware she was pregnant until Thursday, when she went to the doctor for “abdominal pain and constipation,” the chief said at the news conference.

She told investigators that on Friday she experienced stomach pain and “unexpectedly gave birth,” he said.

“She further explained that she panicked, did not know what to do or who to call,” Fons added. The mother then placed the baby in trash bags and drove around before deciding to put the baby in the dumpster.

The young woman’s parents told investigators they did not know their daughter was pregnant and were only aware that she was having some stomach problems, authorities said.

Authorities are now working to set up an interview with the alleged father of the baby.

“These types of calls often stay with officers long after they are resolved, often for many, many years, sometimes forever, ” Fons said.

Anyone who wants to make a donation towards the child can do so at the New Mexico Children Youth & Families Department office, the release added.

The police and fire departments are designated as Safe Haven sites, the chief added.

“A person may leave an infant with a staff of a safe haven site without being subjected to criminal prosecution for abandonment or abuse if the infant was born within 90 days of being left at the safe haven site, as determined within a reasonable degree of medical certainty, and not left in a condition that would constitute abandonment or abuse of a child,” Fons said.

The chief advised anyone who may be in a similar situation to contact authorities for help.

The-CNN-Wire™ & © 2022 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox