MEXICO CITY — Mexico’s supreme court voted Tuesday to decriminalize abortion, a striking step in a country with one of the world’s largest Catholic populations and a decision that contrasts with tighter restrictions introduced across the border in Texas.

Ten supreme court judges ruled unconstitutional a law in northern Coahuila state that imposed up to three years of prison for women who underwent illegal abortions, or people who aided them. The 11th judge was absent during the vote. The ruling is binding on other states.

“Today is a watershed in the history of the rights of women and pregnant people, above all the most vulnerable,” Chief Justice Arturo Zaldívar said.

The vote comes as a powerful women’s movement is transforming Mexico. Female politicians now make up half of the National Congress, and an ambitious constitutional reform passed in 2019 aims to ensure gender equality in senior government positions. While abortion remains illegal in most of Latin America, there has been a surge in demonstrations demanding more rights for women, particularly focused on rising violence.

“This will not only have an impact in Mexico; it will set the agenda for the entire Latin American region,” said Melissa Ayala, coordinator of litigation for the Mexican feminist organization GIRE.

Four countries in Latin America allow abortion under virtually all circumstances in the early stages of pregnancy: Argentina, Cuba, Uruguay and Guyana. At the other end of the spectrum, some nations forbid abortion for any reason. In El Salvador, women accused of aborting a fetus can be prosecuted on assault or homicide charges, and face decades in prison.

Four of Mexico’s 32 federal entities have broadly legalized the procedure — Oaxaca, Veracruz, Hidalgo and Mexico City. Abortion has also been available to women who became pregnant through rape.

A handful of antiabortion protesters prayed and demonstrated outside the supreme court Tuesday as the justices wrapped up their second day of arguments. The Catholic Church had expressed its concern a day earlier, in an editorial in its magazine Desde la Fe — “From the Faith.” “Don’t create a huge setback just to please an ideology in vogue, or due to peer pressure,” it urged the judges.

The conservative National Action Party also rejected the court’s arguments. “We are in favor of defending life from the moment of conception until natural death,” it said in a statement.

Yet the decision was out of the hands of politicians. Under Mexican law, a supreme court ruling supported by at least eight justices supersedes state laws.

Abortion won’t become widely available right away, but the ruling will “outline a route, a criteria” that states will use to change their laws, said Diego Valadés, a former supreme court judge.

“Abortion has been effectively decriminalized in Mexico,” said Paula Avila-Guillen, executive director of the New York-based Women’s Equality Center. “And every woman currently imprisoned in the country for abortion can use this precedent to be freed.”

It’s unclear how many Mexicans have been jailed on abortion charges. In a recent study, GIRE found at least 500 criminal trials were held between 2007 and 2016, but it acknowledged that it was unable to find data for many states.

Mexico has the world’s second-largest population of Catholics, after Brazil. Around three-quarters of Mexicans identify as members of the faith, according to census data. But the government is officially secular, and the church has been losing influence, due in part to clerical sex-abuse scandals.

Mexicans have also become increasingly aware of the problem of unwanted pregnancies, especially among teenagers. More than 1 million abortions are performed each year in Mexico, most in unsafe conditions, according to estimates by the U.S.-based Guttmacher Institute, a research organization that supports access to reproductive health.

“The effects on women’s health, including the number of deaths registered due to clandestine abortions, and the number of child pregnancies, represent a profound social problem,” said Valadés. “So the attitude of most of society toward abortion has changed, despite the resistance of ecclesiastical authorities.”

Analysts said the ruling reflected years of activism by women’s groups who have promoted gender equity and rights in federal and state governments, health ministries and courts. Before the pandemic, hundreds of thousands of women joined protests against femicide and labor abuses, in a burgeoning movement also fueled by the global “#MeToo” phenomenon.

“The Mexican supreme court understood the climate had changed,” said Denise Dresser, a prominent political scientist. She noted that political factors may have also been in play. Zaldívar, the chief justice, has been under fire for his close relationship with President Andrés Manuel López Obrador. A congressional maneuver that would have extended the chief justice’s term was recently dropped, after critics assailed it as unconstitutional.

“This is a way of recuperating his reputation as a progressive,” said Dresser. “It’s a way in which the court positions itself as a protector of rights, when rights are being limited or are being suppressed in other areas.”

López Obrador rose to power as a leader of the left, but many feminists have expressed disappointment with his policies. He cut funds for women’s shelters as part of a broader austerity program and has expressed suspicion that opposition political parties are behind the women’s movement. The president has defended his record, noting he named Mexico’s first cabinet in which women made up half of the members.

His winning coalition included a small party, Social Encounter, that is firmly opposed to abortion. For his part, López Obrador has been neutral on the subject.

“Women have to sort this out, the Mexican people have to sort this out,” he said at his daily news conference Tuesday, when asked about the court deliberations. “We have acted, in my case as president, with prudence, in a respectful manner, because these are very controversial, polemical topics. And we don’t want to encourage any confrontation.”

The ruling comes as Texas is implementing a law that effectively bans abortions after six weeks. Republican leaders in at least seven states are considering copying it. The Guttmacher Institute said recently that more abortion restrictions had been enacted by U.S. states in 2021 than in any year since the U.S. Supreme Court legalized abortion in the 1973 Roe v. Wade decision.

Read more: