The Constitutional Tribunal of Chile has approved a bill that will allow abortion in some situations, a move that Socialist President Michelle Bachelet has campaigned for since 2015.

The judges voted six to four to permit abortions in cases of rape, some birth defects, and when the mother’s life is in danger, reports AFP.

“The women of Chile have won back the basic right to decide for ourselves in extreme cases, particularly cases that can be very painful,” Bachelet said in celebration of the ruling. “Today it is women who are the winners. I believe that today democracy once again has won, and Chile has won.”

Planned Parenthood Global celebrated the tribunal’s decision:

Abortion under any situation has been a punishable crime in Chile since 1989, near the end of the tenure of Augusto Pinochet. The procedure was allowed prior to that time when the mother’s life was threatened or the unborn baby was considered not able to survive outside the womb.

Americans United for Life senior counsel Clarke Forsythe said his group – which had recommended maintaining the abortion prohibition – is “deeply disappointed” that Chile’s Constitutional Tribunal approved the bill that eases restrictions on abortion.

“The Chilean Constitution explicitly states that ‘the constitution secures everyone’s right to life and to physical and psychical integrity,’” Forsythe said. “The law protects the life of the unborn.”

Forsyth observes that, according to a 50-year study, Chile’s maternal mortality rate has decreased since the institution of its abortion ban in 1989.

“As of 2012, Chile had the lowest maternal mortality ratio in Latin America,” he notes, adding:

If there is a silver lining, it is the Court’s close vote today, 6-4, and that the Court merely allowed a legalization bill to go into effect. Unlike the US Supreme Court’s decision Roe v. Wade, the Constitutional Tribunal did not create a constitutional right that would be immune from legislative correction. The Chile Chamber of Deputies and the Senate can repeal this legalization bill once they realize its negative impact on women, their children and the broader society.

Bachelet, a pediatrician, leaves office in March of 2018, after her second term as president. She was elected as Chile’s first female president from 2006-2010. During her tenure, she succeeded in having same-sex civil unions approved in Chile and anticipates full same-sex marriages soon.

Her second term has been marked by corruption scandals, including one involving her son.

In the four years after her first term, she served in the U.N. working on female empowerment issues, reports AFP.

Many Latin American countries have begun to decriminalize abortion. El Salvador, Honduras, and Nicaragua, however, continue to ban the procedure.