Maria Teresa Rivera was sentenced to 40 years in jail for the “crime” of suffering a miscarriage. And yet in El Salvador, a nation with perhaps the most draconian situation in the world for reproductive rights, she is one of the lucky ones.

Earlier this month, in a ruling that gave heart to activists around the world, the conviction of Ms Rivera - accused of seeking to abort her child and convicted of murder - was overturned when a judge decided there was insufficient evidence. Having spent five wretched years in a filthy, overcrowded jail, during which time she received no visits from her family, she was finally reunited with her child, Oscar.

“I am happy that I am with my son,” she told The Independent, smiling as she hugged him. “But I am fearful because not all of society agrees with what happened.”

Ms Rivera had no idea she was to be released (Center for Reproductive Rights ) (Center for Reproductive Rights)

The case of the Ms Rivera, 33, has drawn attention to a reality that activists in El Salvador have described as nothing less than a battle to control women’s bodies.

The Latin American nation, which has a population of around six million, is one of just a handful of countries where abortion is illegal in all circumstances. Yet activists say, no country matches El Salvador for the aggressive manner in which those laws are enforced.

Prior to 1998, abortion was permitted in cases of rape, incest, where a foetus was injured or if the life of the woman was in danger. Yet that year, amid pressure from religious conservatives, the law was changed to remove any exceptions whatsoever. It is estimated that between 1998 and 2013, more than 600 women have been jailed after being accused of having had an abortion.

Campaigners - who were infuriated by Republican presidential candidate Donald Trump’s recent comments that women who had abortions should be punished - say large numbers of those that are prosecuted are women who have suffered a miscarriage. Having been rushed to public hospitals for treatment, the women find themselves transformed into alleged killers. In many cases, women have been handcuffed to their hospital beds by the police.

“These laws are made by men to control women’s bodies,” said Sara Garcia, a campaigner with the Citizens’ Group for the Decriminalisation of Abortion, which has supported Ms Rivera. “If the laws were to affect their own bodies, they would not have this kind of law. These laws are a form of violence.”

Ms Rivera was among a group of women convicted of “aggravated homicide” and handed jail terms of up to 40 years. The plight of “Las 17” has drawn attention both in El Salvador and internationally, and she is the third of the women to be released.

However, all the time, the authorities continue to prosecute more women and send them to jail. There are currently 25 behind bars having been convicted under these strict regulations, almost all of them single, poor and largely uneducated - women who do not have the opportunity to catch the two-hour flight to Miami and visit a private clinic.

Ms Rivera said the prisoners were often discriminated against (Center for Reproductive Rights ) (Center for Reproductive Rights)

Shocking

The circumstances of Ms Rivera’s case are nothing less than shocking.

In 2011, the factory worker was at the home on the edge of San Salvador she shared with her son and her mother-in-law - her husband had left several years before - when she awoke with an intense thirst. According to court papers, she fainted and when she came around she experienced a strong urge to defecate.

As she sat in the outdoor toilet, she had intense cramps and “felt as if a little ball fell from her body.” Then she fainted once again, and fell to the ground where she was found by her mother-in-law.

Nobody knew she had given birth, and Ms Rivera said she had no idea she was even pregnant. Yet when she awoke at the hospital she was told she had given birth and that police had gone to her home and discovered the dead foetus. She was detained at the hospital and taken before the court where a judge sentenced her to 40 years. An international effort by campaigners around the world - along with pressure from the US State Department - resulted in that conviction being overturned.

“Maria Teresa’s release is a victory and symbolises hope for women who have suffered under El Salvador’s unjust laws,” said Nancy Northup, president of the Washington-based Centre for Reproductive Rights.

“Women should never face criminal prosecution when they suffer pregnancy complications.”

The struggle for women’s rights in El Salvador is taking place in the context of a deeply unequal society and one that is recovering from the impact of a bloody 12-year civil war between a military-controlled government and left wing guerrillas that left up to 75,000 people dead. Twenty years after the ceasefire that ended that war, El Salvador is once again reeling from violence, most of it killings by rival gangs and the anti-gang operations of the police and military. Earlier this year, El Salvador became the deadliest peace-time country per capita, an inglorious title it took from neighboring Honduras.

Ms Teresa spent five years in El Salvador's overcrowded women's jail (Getty)

Catholic Church

The move to change the law in 1998 to remove the exceptions for abortion was done under pressure from right wing politicians and the Catholic Church, which wields enormous power in the country. The then Archbishop, Fernando Sáenz Lacalle, was a member of the ultra-conservative group Opus Dei, and supported the change. At around the same time, the country’s constitution was amended to say that “life began at conception”, opening up the zealous murder claims against women who may have suffered medical issues beyond their control.

Alfredo Vela Cuellar, a spokesman for Opus Dei in El Salvador, said the group supported the total ban on abortion as it believed it helped protect women from attacks and sexual assaults.

He said that those campaigning for exceptions to be reintroduced, were proposing that women who had already suffered violence - such as rape - undergo more “violence” by having an abortion. “All the time, there are more options, such as giving away the child, which is a positive alternative,” he said.

The church has the support of a number of anti-abortion groups. Carla de la Cayo, president of Yes to Life Foundation, the largest anti-abortion advocacy organisation in the country, last year told the Globe and Mail newspaper:

“Life is sacred – you don’t have the right to kill someone because someone else will suffer. We leave this decision to God.”

The limited access to contraception and sexual education in schools, along with the prohibition on abortion, has led to a situation that campaigners say is nothing less than a crisis. It is estimated that in 2014, 32 per cent of the total pregnancies - 24,709 - were of teenagers. An estimated 1,545 were of girls aged between 10-14.

Doctors have also said they cannot intervene in emergency situations, such as as ectopic pregnancy, until a foetus is shown to be dead, despite the often pressing threat to the woman’s life.

Meanwhile, alongside this, is an illicit resort to illegal and sometimes deadly abortions. A survey by the country’s ministry of health suggested that there were 19,290 such abortions between 2005 and 2008.

Salvadorean activist gives her thoughts on Donald Trump

Illegal abortions

However, the Guttmacher Institute, a US organisation that works on reproductive health issues around the world, has estimated there are 35,000 a year in El Salvador. An estimated 11 per cent of those result in the death of the woman. Reports suggest that many women resort to the use of drugs designed to treat stomach ulcers.

On an evening when San Salvador’s traffic appeared to move a little more freely than usual, The Independent met a female doctor who had quit her job with a state hospital after her new boss told to call the police on women suspected of having having had an abortion. She now runs her own clinic, where she estimates she has helped two dozen women terminate their pregnancies. For this, she said, she could be jailed for up to 12 years, but she said she must help women in need.

“When I was a medical student I was told that we did not need to call the police because if a person thought that was going to happen, they would not come to the hospital,” she said. “Many of the women don’t have access to contraception or else it does not work.”

Asked about the risk of being jailed, she said: “You don’t think a plane is going to crash when you get on it, so I work like that.”

The former guerrillas of the Farabundo Marti National Liberation Front (FMLN) have held El Salvador’s presidency since 2009, and yet they have been slow to seek to try and change the prohibition on abortion. (A decade earlier, the party allowed its members an open vote on the issue, a decision many of its supporters say was a mistake.)

Ms Rivera said she prayed during the difficult times in jail (Center for Reproductive Rights ) (Center for Reproductive Rights)

Some activists voice disappointment that a party established on a progressive agenda has not done more for the reproductive rights of women. President Salvador Sanchez Ceren has gone only as far as to say the issue warranted “discussion”.

In an interview in his office in the centre of crowded San Salvador, the country’s deputy health minister, Eduardo Espinoza, said he disagreed with the laws, but that there was little opportunity to change them. He claimed that 100 per cent of women had access to affordable contraception but admitted that sex education was insufficient.

He said that his ministry had given instructions to doctors that that they were not required to inform the Justice Ministry, or the police, in cases where they suspected a woman had self-aborted as they were protected by their relationship with their patients.

But he said he could not control everyone. “You get fanatically religious doctors who see that something has happened and immediately call the police or the law ministry,” he said. “This violates the presumption of innocence.”

Pray

Ms Rivera said the hardest thing of the five years she spent in jail - a time when she and others were abused by other inmates for having been convicted of aborting a child - was not being able to communicate with her son. The only way she could get messages to him, was via activists, lawyers or members of the media who secured permission to visit the shabby women’s jail. (The Independent was not granted permission to enter.)

“It was horrible, horrible, in the jail. One of my fellow inmates got beaten. It was very crowded and there was not much water. There were 250 women in a dormitory designed for 100,” she said.

She said that she was not permitted to keep a photograph of her son. And she began to cry when she explained how she would close her eyes to call up an image of him in her head.

She said she got through the most difficult time with the support of the other members of “Las 17” and by praying at a church inside the jail.

“Sometimes I would feel sad and depressed. I used to to go the church and pray,” she said. “It helped a lot.”

Ms Rivera said she did not know that she was to be released when she appeared before the judge on May 11. As it was, she was set free immediately and had no chance to say goodbye to her fellow inmates.