A teenager in El Salvador has been sentenced to 30 years in jail for aggravated homicide after delivering a stillborn baby in a toilet.
Prosecutors argued Evelyn Beatriz Hernandez Cruz had avoided antenatal care, tantamount to killing the child.
Her lawyers said she did not know she was pregnant and no crime had occurred. They said the pregnancy was as a result of repeated rapes she did not report.
The Central American country completely bans abortion in all circumstances.
Dozens of women have been imprisoned for the deaths of their foetuses in cases where they said they had suffered miscarriages or stillbirths.
In April last year, Ms Hernandez gave birth in the latrine of her home in a small rural community. She lost consciousness after losing large amounts of blood.
When her mother took her to hospital, leaving the baby's remains behind, Ms Hernandez was detained on suspicion of procuring an abortion.
Eleven days later she had an initial court hearing and she has been in custody since.
Her charge was changed to aggravated homicide when no evidence was found of her having had an abortion.
Although she was in the third trimester, Ms Hernandez said she had confused the symptoms of pregnancy with stomach ache because she had experienced intermittent bleeding, which she thought was her menstrual period.
She told the court: "I did not want to kill my son."
The judge did not believe she did not know she was pregnant.
Much of the case centred on whether the baby was dead at birth or died in the moments afterwards, but medical experts were unable to determine the answer definitively.
The human rights organisation Amnesty International condemned the sentence and Ms Hernandez's lawyer, Bertha de Leon, said she would appeal.
Efe Alberto Romero, from the Citizens' Group for the Decriminalisation of Abortion, said witnesses could not determine whether Ms Hernandez had intended for the baby to die, and that she had become pregnant due to repeated rapes in a forced sexual relationship.
Her lawyers said she had been too frightened to report the rapes. Some reports say the man who raped her was a gang member.
Pro-choice campaigners in El Salvador and around the world have argued that the country's absolute abortion ban criminalises people who have not sought abortions but have had natural miscarriages, as well as forcing women to carry pregnancies to term despite risk to their own lives.
Countries with an absolute ban on abortion:
- The Dominican Republic
- El Salvador
- The Vatican