A teenage rape victim impregnated by her attacker has been jailed for 30 years after her baby son failed to survive.

Evelyn Beatriz Hernandez Cruz, 19, was convicted of aggravated homicide after prosecutors argued that she did not want the baby and intentionally threw the infant into a septic tank after she gave birth.

The baby was born prematurely at 32 weeks and Cruz’s lawyers said she was unaware that she was carrying a child and had suffered a stillbirth due to pregnancy-related complications.

Activists including Amnesty International have condemned the sentence, calling it a “terrifying example” of El Salvador’s “retrograde” anti-abortion law which jails women who suffer a miscarriage or stillbirth.

Her lawyer told the court that she had an out-of-hospital birth because she didn’t know she was pregnant.

They argued that medical experts were unable to ascertain whether the foetus died in utero and that two experts, including one in charge of the autopsy, found meconium – a baby’s first stool – in the child’s airways and that could have caused the death.

They also accused police of “contaminating” evidence by washing the baby’s body before it was analysed by experts, and said the judgment was flawed and based on prejudice.

However the female judge accepted the prosecution’s argument that she intentionally killed the child.