Mendoza was 17 years old and brand new to the United States when she suffocated the baby girl two years ago.
Her attorney tells Action News it's fair to say her illegal immigration led to two tragedies.
Gloria Santos Mendoza stared blankly across the courtroom as she admitted to the attempted murder of her newborn daughter. The plea deal will send her to prison for a
life sentence, but gives her a chance at freedom before she turns 26.
"I believe justice has been done," said Madera County district attorney David Linn. "The case has been resolved in an appropriate way."
Mendoza's crime started with an illegal journey from her home in Guerrero, Mexico -- a trip that turned into a horror story.
"She sets on this journey from lower Mexico to Tijuana," said her defense attorney, Ralph Torres. "She gets gang raped there. She becomes pregnant. She crosses to live with her brother."
Mendoza gave birth in her brother's bathroom, but still denied it when she was admitted to a hospital with postpartum bleeding. Madera police later found the dead child under the bathroom sink.
But Torres says Mendoza has no memory of giving birth or killing the baby girl.
Two doctors said she was insane at the time.
"Because of the gang rape, I think she had totally disavowed being pregnant, didn't really believe it, and didn't believe she was going to give birth," Torres said.
An insanity plea could've meant decades in a mental hospital. So, she reached a deal with the district attorney, who acknowledged a jury might have found Mendoza to be sympathetic, despite her crime.
Judge Ernie LiCalsi will officially sentence Mendoza to ten years to life in prison in October.
Her first parole hearing would come in six years and because she was a juvenile offender, her attorney says she has a good chance at getting out -- then getting deported to live with her mother.