Conservative factions in Chile’s Congress fought abortion legalization bills vigorously over the years, even as a growing number of Chileans came to see abortion as a fundamental right.

The new law authorizes terminating a pregnancy if it endangers the life of the mother; when the fetus is unviable; and when pregnancy resulted from rape.

Opposition lawmakers have argued the law would prompt false rape claims and said medical professionals who objected to abortion on moral grounds should not be forced to perform the procedure. The law allows the objectors to refuse unless the mother’s life is in imminent danger and no other medical professionals are available.

A public opinion poll conducted by the research firm Cadem last month found that 70 percent of respondents supported legalizing abortion under the criteria described in the law. The poll included 705 respondents and had a margin of error of plus or minus 3.7 percentage points.

Abortion-rights groups say 60,000 to 70,000 clandestine abortions are performed in Chile each year, often in unsafe conditions. The risks are not solely medical. Any participant in an abortion in Chile may be sentenced to up to 15 years in prison. From 2010 to 2014, nearly 500 people were charged in abortion cases, 86 percent of them women who had terminated pregnancies, according to Miles, a reproductive rights group.