Argentina's Senate voted early on Wednesday to legalize elective abortion in the heavily Catholic country.

The Senate passed the bill 38-29 after a debate that went past midnight, according to an NPR report.

The voting garnered one abstention just over two weeks after the Chamber of Deputies, which is Argentina's Congress, approved the measure.

The move comes after years of organizing within the Argentine abortion-rights movement.

Elizabeth Gómez Alcorta, minister of women, genders and diversity, wrote on Wednesday after the Senate vote that the movement is finally a law.

"Today we took a huge step and we are getting closer to the Argentina we dream of," Alcorta was quoted on a report.

Alcorta added that they are writing their destiny and making history.

Related story: Argentina's Lower House Approves Bill to Legalize Abortion

Abortion in Argentina

The Voluntary Interruption of Pregnancy Bill allows an abortion to take place throughout the first 14 weeks of pregnancy.

Currently, abortion in Argentina is only legal if the mother's life is put in danger or if the pregnancy is a result of rape.

Meanwhile, women who decided to have an abortion outside these exemptions can face criminal charges.

Argentine President Alberto Fernández proposed the legislation in mid-November.

The country's president has been vocal about legalizing abortion during his presidency, adding that he will sign the measure.

Fernández was elected in the position in late 2019.

After the legislation was passed, Fernández said that today Argentina is a better society that expands rights to women and guarantees public health.

Argentina has been the homeland of the Catholic pope, Pope Francis.

He has spoken about his opposition to the legislation, describing that abortion is like hiring a hit man.

Abortion is not widely practice in a region, where the Church has held cultural and political shifts for years.

Abortion was only allowed on demand only in Communist Cuba, tiny Uruguay, and some parts of Mexico, according to a Reuters report.

Thousands of people who had supported the bill cheered outside the Senate Building in Buenos Aires after the result was read out.

Vilma Ibarra, the author of the law and legal and technical secretary for the presidency, wept as she spoke to the reporters after the result was announced.

Ibarra said that this has been a struggle for many years, adding that many women died.

"Never again will there be a woman killed in a clandestine abortion," Ibarra was quoted on a report.

Monica Macha, a lawmaker siding with the president's center-left ruling coalition, said that there are no words for this moment, adding that it passes the body and the soul.

Pope Francis, tweeted about the issue on Tuesday before the Senate debate.

"The son of God was born discarded to tell us that every person discarded is a child of God," Pope Francis was quoted on a tweet.

Juan Papier, a senior Americas researcher at Human Right Watch, said that adopting a law that legalizes abortion in a Catholic country will inspire the struggle to ensure women's rights in Latin America.

Papier added that although there could be resistance, the new law could have a domino effect in the region, as what occurred in 2010 when the country legalized same sex marriage.

Related story: Catholic Church Losing Popularity in Latin America: Report