A newborn child was in critical condition after being found abandoned in the restroom of a sandwich shop Monday morning in West Covina, California, police said.

A transient walked into the Subway restaurant at 2540 S. Azusa Avenue about 8:30 a.m., gave birth in the bathroom and left the child in the toilet, according to the West Covina Police Department.

A customer saw blood and alerted the manager, then an employee called 911.

"There's a pregnant lady," a woman in a 911 recording said. "She just gave birth in the restroom and she just walked out."

An umbilical cord led to the toilet, where a baby was found sitting upright, crying and submerged in the toilet with his head above water, police said. Paramedics arrived and took the child to Queen of the Valley Medical Center.

Officers followed a blood trail to the rear of a business, where they found the woman, identified by police as 38-year-old Mary Grace Trinidad. She was arrested and taken to the hospital for medical treatment.

Trinidad faces charges of attempted murder and child endangerment. She was also wanted on a $30,000 drugs warrant, police said.

Information on an attorney for Trinidad was not immediately available.

Lydia Olivar, who works at the restaurant next door, said the woman believed to be the baby's mother would sometimes sleep in the alley behind the restaurant.

"She always asks for food, even a cup of soup or a scoop of rice," Olivar said.

According to the Safe Surrender law, parents can drop off their newborn at any hospital or fire station confidentially within 72 hours without fear of prosecution.

More information on the Safe Surrender law can be found at the following sites:

www.babysafe.ca.gov/

babysafela.org/

Nyree Arabian contributed to this report.