In this photo released by Argentina's Senate press office, protesters demonstrate in support of loosening the abortion law, left, and against abortion, right, in this photo taken from Congress where lawmakers are debating the issue in Buenos Aires, Argentina, Wednesday, Aug. 8, 2018. Following months of increasingly tense debate, lawmakers are meeting ahead of a vote on a bill that would decriminalize abortions up to the first 14 weeks of pregnancy. (Delfina Linares/Argentine Senate via AP)
PHOTO: Delfina Linares/AP
In this photo released by Argentina's Senate press office, protesters demonstrate in support of loosening the abortion law, left, and against abortion, right, in this photo taken from Congress where lawmakers are debating the issue in Buenos Aires, Argentina, Wednesday, Aug. 8, 2018. Following months of increasingly tense debate, lawmakers are meeting ahead of a vote on a bill that would decriminalize abortions up to the first 14 weeks of pregnancy. (Delfina Linares/Argentine Senate via AP)
Now playing
03:21
Argentina's Senate rejects legalizing abortion
WASHINGTON, DC - JUNE 26:  U.S. Sen. Susan Collins (R-ME) attends a lunch meeting for Republican lawmakers in the Cabinet Room at the White House June 26, 2018 in Washington, DC. The president called the Supreme Court's 5-4 ruling in favor of the administration's travel ban a "tremendous victory," according to published reports.  (Photo by Al Drago-Pool/Getty Images)
PHOTO: Pool/Getty Images
WASHINGTON, DC - JUNE 26: U.S. Sen. Susan Collins (R-ME) attends a lunch meeting for Republican lawmakers in the Cabinet Room at the White House June 26, 2018 in Washington, DC. The president called the Supreme Court's 5-4 ruling in favor of the administration's travel ban a "tremendous victory," according to published reports. (Photo by Al Drago-Pool/Getty Images)
Now playing
01:23
Collins discussed Roe v. Wade with Kavanaugh
Dana will do a sit-down 3 camera interview (fs7s) with the VP.  Crews can start setting up at 12:30pm. **Crew should plan to plug in the Pence ISO shot live.  The House Gallery has given us permission to plug in to the drop behind H-137 (across from Clyburn's office). If we have trouble finding the drop just go to the Gallery and they'll walk you to it.
PHOTO: CNN
Dana will do a sit-down 3 camera interview (fs7s) with the VP. Crews can start setting up at 12:30pm. **Crew should plan to plug in the Pence ISO shot live. The House Gallery has given us permission to plug in to the drop behind H-137 (across from Clyburn's office). If we have trouble finding the drop just go to the Gallery and they'll walk you to it.
Now playing
02:08
Pence: I do still want Roe v. Wade overturned
PHOTO: CNN
Now playing
01:08
Toobin: Roe v. Wade is doomed because Trump won
WASHINGTON - FEBRUARY 05:  The U.S. Supreme Court is shown February 5, 2009 in Washington, DC. It was announced today that Supreme Court Justice Ruth Bader Ginsburg had surgery after being diagnosed with pancreatic cancer. (Photo by Win McNamee/Getty Images)
PHOTO: Win McNamee/Getty Images
WASHINGTON - FEBRUARY 05: The U.S. Supreme Court is shown February 5, 2009 in Washington, DC. It was announced today that Supreme Court Justice Ruth Bader Ginsburg had surgery after being diagnosed with pancreatic cancer. (Photo by Win McNamee/Getty Images)
Now playing
02:13
Supreme Court rejects challenge to abortion law
Khadijah Dija
PHOTO: Alex Platt/CNN
Khadijah Dija
Now playing
05:07
Trump's funding ban leads to more abortions
PHOTO: Sister Supporter
Now playing
01:31
Anti-abortion protests banned outside London clinic
People hold up coat hangers as they demonstrate in front of the seat of the Warsaw archdiocese on March 18, 2018 in a protest against what they call the Catholic Churchs intrusion into politics by supporting a new measure to tighten the already restrictive law on abortion. / AFP PHOTO / JANEK SKARZYNSKI        (Photo credit should read JANEK SKARZYNSKI/AFP/Getty Images)
PHOTO: JANEK SKARZYNSKI/AFP/Getty Images
People hold up coat hangers as they demonstrate in front of the seat of the Warsaw archdiocese on March 18, 2018 in a protest against what they call the Catholic Churchs intrusion into politics by supporting a new measure to tighten the already restrictive law on abortion. / AFP PHOTO / JANEK SKARZYNSKI (Photo credit should read JANEK SKARZYNSKI/AFP/Getty Images)
Now playing
03:27
Polish women go to Germany for legal abortions
PHOTO: CNN
Now playing
01:36
Abortion wasn't always taboo in America
PHOTO: Matthew Busch for CNN
Now playing
05:56
Mom: I would have had an abortion
The Justices of the U.S. Supreme Court sit for their official photograph on October 8, 2010, in Washington.
PHOTO: TIM SLOAN/AFP/Getty Images
The Justices of the U.S. Supreme Court sit for their official photograph on October 8, 2010, in Washington.
Now playing
01:27
The most important abortion case in decades
PHOTO: Casey Capachi/ CNN
Now playing
02:58
A mother's voice: Abortion after 20 weeks
pkg arizona school rips abortion pages out biology books_00004903.jpg
PHOTO: KTVK
pkg arizona school rips abortion pages out biology books_00004903.jpg
Now playing
01:25
School to rip abortion page out of books
Colorado springs shooting planned parenthood past todd live tsr_00000407.jpg
PHOTO: Google
Colorado springs shooting planned parenthood past todd live tsr_00000407.jpg
Now playing
02:29
Has Planned Parenthood been targeted in past attacks?
scalia roe v wade piers intv_00030419.jpg
scalia roe v wade piers intv_00030419.jpg
Now playing
04:07
2012: Scalia: Constitution says nothing about abortion
A 29 October 2006 photo shows the US Supreme Court in Washington, DC.            (Photo credit should read MANDEL NGAN/AFP/Getty Images)
PHOTO: MANDEL NGAN/AFP/Getty Images
A 29 October 2006 photo shows the US Supreme Court in Washington, DC. (Photo credit should read MANDEL NGAN/AFP/Getty Images)
Now playing
01:37
Supreme Court to hear challenge to major abortion case
(CNN) —  

Argentina’s Senate voted against legalizing elective abortion in the early hours of Thursday morning, dashing the hopes of abortion rights advocates in the predominantly Catholic country, homeland of Pope Francis.

The Senate rejected the proposed bill 38 to 31, with two abstentions and one absentee.

The bill, which fueled contentious debate, would have expanded abortion rights to allow women to end a pregnancy in the first 14 weeks. Current laws allow the procedure only in cases of rape or when the mother’s health is at risk.

A heavy police presence around the National Congress in Buenos Aires quickly quelled scattered confrontations after the vote’s outcome was announced. As soon as the vote was announced, fireworks went off outside Congress as jubilant anti-abortion demonstrators dressed in blue – the color of the “save both lives” movement – danced and cheered.

Anti-abortion demonstrators celebrate outside Congress in Buenos Aires, Argentina, early Thursday.
PHOTO: Luisa Balaguer/AP
Anti-abortion demonstrators celebrate outside Congress in Buenos Aires, Argentina, early Thursday.

Abortion rights activists gather around a bonfire to keep warm as celebratory fireworks go off in the distance.
PHOTO: Natacha Pisarenko/AP
Abortion rights activists gather around a bonfire to keep warm as celebratory fireworks go off in the distance.

Hundreds of thousands of people had gathered outside Congress throughout the day to mark their support for and opposition to the bill that has divided Argentine society.

A small number of pro-abortion rights protestors lit fires and threw rocks and bottles at police, who responded with tear gas and water cannon. Most of the clashes quickly died down. As many as eight people were detained, according to media reports.

Around an hour after the vote most people had left the streets around Congress, leaving them strewn with litter.

A woman throws a bottle outside the Congress early Thursday.
PHOTO: EITAN ABRAMOVICH/AFP/Getty Images
A woman throws a bottle outside the Congress early Thursday.

Riot police agents arrest a demonstrator outside the Congress.
PHOTO: EITAN ABRAMOVICH/AFP/Getty Images
Riot police agents arrest a demonstrator outside the Congress.

Opposition mounted ahead of the vote in Argentina’s more conservative Senate after the legislation only narrowly passed through the lower house of Congress in June. And the bill lost momentum over the weekend when an opposition senator withdrew her support.

Hopes among supporters were briefly raised when Senator Cristina Fernández de Kirchner, who had refused to address abortion during her two terms as Argentina’s president, announced she had changed her mind and would vote for the bill.

“It was the thousands of young women who went out to the streets who made me change my opinion,” she told the Senate Wednesday. “To see them criticize the realities of a patriarchal society should force all of us to look at this differently.”

Although he opposes abortion, President Mauricio Macri said earlier this year that he would not veto the legislation if it passed.

Protesters demonstrate in support of loosening the abortion law, left, and against abortion, right, in this photo taken from Congress where lawmakers were debating the issue.
PHOTO: Delfina Linares/AP
Protesters demonstrate in support of loosening the abortion law, left, and against abortion, right, in this photo taken from Congress where lawmakers were debating the issue.

Activists in favor of legalizating abortion comfort each other outside the National Congress.
PHOTO: EITAN ABRAMOVICH/AFP/AFP/Getty Images
Activists in favor of legalizating abortion comfort each other outside the National Congress.

One woman who was demonstrating in favor of abortion rights in Buenos Aires before the vote used Instagram to express her frustration at the result.

“Today no one won,” wrote the women who posts under the name Veronnica Diaz. “The abortions WILL KEEP HAPPENING, the women will continue to die in clandestine abortions and your Neanderthal position of ‘saving two lives’ in a comfortable social inequality will continue without saving ANY LIFE.”

Celia Szusterman, trustee of the UK board of Pro-Mujer and director of the Latin America program at the Institute for Statecraft, told CNN that the result was “a step backward for women’s rights and women’s health.”

She says it’s a “sad day… not only because of the way the vote went but the way the campaign for and against went. It was so divisive.”

Pro-choice activists hold green banners as they demonstrate outside Congress on  Thursday.
PHOTO: EITAN ABRAMOVICH/AFP/Getty Images
Pro-choice activists hold green banners as they demonstrate outside Congress on Thursday.

But even with its defeat, the groundswell of support for the legislation is not expected to go away, with those who supported the bill saying it was a victory that it was even debated.

Activists say they’ll keep pushing the bill, in the hope that it passes one day soon.

“It will happen because that’s the world – to increase rights and this is one of the fundamental rights that is still not available to women in Latin America,” Szusterman said.

The bill has ignited passions and sparked widespread protests in Argentina, with anti-abortion campaigners protesting in the streets under blue “save both lives” banners and members of the opposing side in the debate donning green bandanas.

As senators debated the bill into the early hours of Thursday morning, pro-abortion rights activists rallied outside Congress chanting “legal abortion at the hospital” while the Catholic Church held a “Mass for Life” in the capital Buenos Aires.

Speaking during the debate, conservative Senator Marta Varela welcomed the mobilization of anti-abortion campaigners.

“Today I feel like never before that I’m part of a wide sector of our people who defend life in general, from the moment of conception and until death,” she said.

Pro-choice activists hold a poster of a woman who died as a result of a clandestine abortion.
PHOTO: Natacha Pisarenko/AP
Pro-choice activists hold a poster of a woman who died as a result of a clandestine abortion.
An activist in favor of legalizing abortion holds a sign reading "Take your Rosaries from our ovaries" during a demonstration outside of Argentina's embassy in Santiago, Chile.
PHOTO: MARTIN BERNETTI/AFP/AFP/Getty Images
An activist in favor of legalizing abortion holds a sign reading "Take your Rosaries from our ovaries" during a demonstration outside of Argentina's embassy in Santiago, Chile.

In recent weeks the so-called “green wave” demonstrations have spread outside of Argentina too. Green bandanas – now a symbol of the abortion rights movement – have been spotted in Brazil, where the country’s supreme court is considering loosening abortion restrictions. And momentum is growing in Chile, where lawmakers voted last year to ease the country’s strict ban.

Supporters of the bill rallied across the region Wednesday, in Chile, Uruguay, Mexico and Peru, as well as across the Atlantic, in Spain.

Bolstered by Ireland’s referendum in May, which removed one of Europe’s last abortion bans, pro-abortion rights activists were hoping they could turn the tide on abortion law in Latin America, where more than 97% of women of reproductive age live in countries with restrictive abortion laws. On Tuesday, 60 Irish parliamentarians, across political parties and groups, signed a letter to the Argentinian senators urging a vote in favor of the bill.

While Pope Francis hasn’t addressed the legislation directly, he did speak out strongly against abortion just days after the bill was approved by the lower house – comparing abortion to avoid birth defects to Nazi eugenics.

The pontiff also issued a letter in March, as the abortion debate began, urging Argentines to “make a contribution in defense of life and justice.”

Journalist Daniel Politi in Buenos Aires and CNN’s Judith Vonberg contributed to this report.