A teenage mother in New Mexico has been arrested and charged with attempted murder and child abuse, after she was captured on CCTV throwing her new-born baby in a dumpster.
Alexis Avila, 18, has confessed to giving birth to the child at another location and placing him in the waste container.
The baby boy was found six hours later by a group of people scavenging on 7 January in Hobbs, a city near the Texas border.
In a press conference streamed on Facebook, Hobbs Police Department's police chief August Fons said the baby was found by two men and two women, who tended to the child and called police.
"Their collective quick response to this emergency was pivotal to saving the babies life," he said.
The baby is said to be in a stable condition in hospital.
Mr Fons said officers were able to link Avila to the incident through the car's licence plate and the teenager voluntarily went to the police station after officers spoke to her parents at their home.
She told officers that she didn't know she was pregnant until 6 January.
"She explained that on Friday, 7 January, she was experiencing stomach pain and unexpectedly gave birth," Mr Fons added.
"She further explained that she panicked, did not know what to do or who to call. She stated that she then cut the umbilical cord, wrapped the baby in a towel and placed the baby in a white trash bag, containing some trash and then inside a larger trash bag."
'Divine intervention saved baby
Video footage of the incident shows a woman, believed to be Ms Avila, throwing a plastic bag into the bin.
The video later shows people searching the dumpster and finding the child inside.
Joe Imbriale, the owner of the Rig Outfitters and Home Store, has lived in the area for 10 years.
He told Sky News that when police initially called him asking to see CCTV footage, he thought someone had broken into his store.
"I thought someone had broken in, so I came down, there was loads of police in the area and I asked them what was happening," said Mr Imbriale, who has set up a Go Fund Me page to help support the baby.
"No one would tell me but I knew something was wrong but that they needed to see my CCTV. When I asked them what they were looking for again, they told me and I broke down crying.
"We saw a girl pull up thrown the bag in a dumpster like a regular piece of garbage, and I was just balling. Two of the officers had to leave. Its affected everyone in the area.
"Six hours that baby was in a black bag, having trash dumped on it. That girl is out of jail today, she spent less time in jail than the baby was in the dumpster."
Mr Imbriale added that it was "very cold", around 20F (-6C), on 7 January and the community is shocked about the incident.
"This is divine intervention, no one can believe the baby survived. A lot of my employees went to school with her and they said she had the scholarship to go to college, and if they found out she was pregnant they would've taken the scholarship away."
Watch: Afghanistan: UN seeks record $5bn in aid to prevent 'suffering'