BUENOS AIRES, ARGENTINA -- Argentina on Wednesday became the largest nation in Latin America to legalize elective abortion, a triumph for a feminist movement that overcame a last-minute appeal by Pope Francis to his compatriots and could pave the way for similar actions across the socially conservative, heavily Roman Catholic region.
After a marathon 12-hour session, the country's Senate passed the law after midnight by a comfortable 38-29 margin just two years after a similar initiative fell short in a cliffhanger vote.
The legislation, which President Alberto Fernandez has vowed to sign into law in the coming days, guarantees abortion up to the 14th week of pregnancy and beyond that in cases of rape or when a woman's health is at risk.
"Safe, legal and free abortion is now the law," Fernandez tweeted after the vote, noting that it had been an election pledge.
"Today, we are a better society that expands women's rights and guarantees public health," he added.
While abortion is already allowed in some other parts of Latin America -- such as in Uruguay, Cuba and Mexico City -- its legalization in Argentina is expected to reverberate across the region, where dangerous clandestine procedures remain the norm a half century after a woman's right to choose was guaranteed in the U.S.
In Mexico, President Andres Manuel Lopez Obrador's party led a chorus of mostly leftist politicians across the region who celebrated the decision.
"We congratulate Argentina's lawmakers for listening in an exemplary way to the clamour of the people and their attention to the popular will," the executive committee of the National Regeneration Movement said in a statement on social media."
Not all the reaction in the region was positive.
Brazilian President Jair Bolsonaro tweeted: "I deeply regret for the lives of Argentinian children, now subject to being ended in the bellies of their mothers with the State's agreement. If it depends on me and my administration, abortion will never be approved on our soil."
Outside Argentina's Senate, pro- and anti-abortion rights activists gathered, with the bill's mostly female supporters wearing the colour green that has characterized their combative movement.
The crowd of a few thousand burst into raucous cheers and tear-filled hugs as Vice-President Cristina Fernandez de Kirchner, who presided over the debate, announced the result, shouting "legal abortion in the hospital!" as the measure was passed.
"I am the mother of a girl and I know that she will have more rights tomorrow and that keeps us moving forward," said Renata Vismara, her voice hoarse after the celebratory street demonstration.
Added Valentine Luy Machado: "The power of seeing it come true after so many years ... it's revolutionary."
Emotions ran high ahead of the vote as well.
Just hours before the Senate session began Tuesday, the pope, who is revered throughout his homeland and has good relations with Fernandez 's Peronist government, weighed in, tweeting: "The Son of God was born an outcast, in order to tell us that every outcast is a child of God. He came into the world as each child comes into the world, weak and vulnerable, so that we can learn to accept our weaknesses with tender love."
Following the vote, the local Roman Catholic bishop's conference issued a statement saying the measure "will deepen even further the divisions in our country" and said it lamented that the country's leadership was distant from the dominant pro-life sentiment across the nation.
The group Pro-Life Unity said the date would be remembered "as one of the most macabre days in recent history."
A previous abortion bill was voted down by Argentine lawmakers in 2018 by a narrow margin. But this time it was backed by the centre-left government, boosted by the so-called "piba" revolution, from the Argentine slang for "girls," and opinion polls showing opposition had softened.
The generational shift was reflected in the stance taken by Vice-President Fernandez de Kirchner. As president between 2007 and 2015, Fernandez de Kirchner opposed legalizing abortion. But she says she was persuaded by her adult daughter to reconsider her position.
Argentina's feminist movement has been demanding legal abortion for more than 30 years and activists say the bill's approval could mark a watershed in Latin America, where the Catholic Church has long dominated. Supporters cite official figures claiming more than 3,000 women have died from clandestine abortions in the country since 1983.
Amnesty International celebrated the vote as "an inspiration for other countries in the region and the world to advance in recognizing access to legal and safe abortion."
Opponents of the bill, separated by a barrier from its backers, watched glumly as the vote unfolded. A group that calls its members "defenders of the two lives" set up an altar with a crucifix under a blue tent.
"These politicians aren't representing the majority," said opponent Luciana Prat, an Argentine flag covering her shoulders.
Reflecting those sensitivities, the legislation allows health professionals and private medical institutions to opt out of the procedure. But they will be required to refer the woman to another medical centre. So-called conscientious objection also cannot be claimed if a pregnant woman's life or health was in danger.