ARGENTINA’S senate has rejected a bill to legalise elective abortion in the first 14 weeks of pregnancy, an issue that has divided the homeland of Pope Francis.

Politicians debated for more than 15 hours and voted 38-31 against the bill. The decision could echo across Latin America, where the Catholic Church has lost influence and moral authority due to secularisation, an out-of-touch clerical caste and an avalanche of sex abuse scandals.

For hours, thousands of supporters wearing green handkerchiefs that represent the effort to legalise abortion and opponents of the measure, wearing light blue, braved the heavy rain and cold temperatures in Argentina’s winter to watch the debate on large screens set up outside congress.

The demonstrations were largely peaceful, but after the vote, small groups of protesters clashed with police, throwing firebombs and setting up flaming barricades. Police responded with tear gas.

The lower house had already passed the measure and conservative president Mauricio Macri had said that he would sign it, even though he is anti-abortion.

In Argentina, abortion is only allowed in cases of rape and risks to a woman’s health.

Thousands of women, most of them poor, are taken to hospital each year for complications linked due to unsafe abortions, the main cause of maternal death.

Backers of the measure said legalising abortion would save the life of many women who now turn to dangerous illegal abortions.

The health ministry estimated in 2016 that the country sees as many as half a million clandestine abortions each year, with dozens of women dying as a result.

The Catholic Church and other groups opposed it, saying it violated Argentine law, which guarantees life from the moment of conception.

“There are positive points that have come out of this, first of all, that even when there are differing ways of thinking, there’s a square in peace right now, with thousands of people defending their convictions,” said Buenos Aires provincial Governor Maria Eugenia Vidal, who was against the measure.

“There was talk of a green square and a light blue square.

“But the truth is that these are people who are right there next to each other, coexisting and defending what they believe to be the truth.”

But the contentious issue has divided Argentinians, pitting conservative doctors and the Catholic Church against feminist groups and physicians.

While thousands of people waited for the decision on the streets guarded by umbrellas, others gathered Wednesday night at a Mass For Life at the capital city’s Metropolitan Cathedral, the church of Pope Francis during his tenure as the archbishop of Buenos Aires.

“It’s not about religious beliefs but about a humanitarian reason,” Cardinal Mario Poli, the archbishop of Buenos Aires, told churchgoers.

“Caring for life is the first human right and the duty of the State.”

Pope Francis this year had denounced abortion as the “white glove” equivalent of the Nazi-era eugenics programme and urged families “to accept the children that God gives them”.

Activists estimate that 3000 women in Argentina have died of illegal abortions since 1983.

“Let’s recognise that we’re facing a public health tragedy because 3,030 women who have died is a tragedy,” said Magdalena Odarda, a senator for Rio Negro province.

“We’re not deciding abortion yes or no.

“We’re deciding abortion in a hospital, or illegal abortion, with a clothes hanger, or anything else that puts a woman in a humiliating, degrading situation, a real torture,” she said.