SANTIAGO, Chile (AP) — Chile's Constitutional Court has thrown out a regulation that prohibited some private hospitals and clinics from refusing to perform legal abortions.

Chile's congress last year ended Chile's absolute ban on abortion, legalizing it in when a woman's life is in danger, a fetus is not viable and in cases of rape. The Constitutional Court upheld the law.

But legislators with President Sebastian Pinera's conservative party challenged a regulation that forbade private health centers to refuse to perform abortions on grounds of conscience if they received state money for obstetric and gynecological services. The legislators argued the regulation violated freedom of association and conscience.

The court supported their challenge on Thursday. Its decision cannot be appealed.

Chile banned abortion under all circumstances in 1989 during the dictatorship of Gen. Augusto Pinochet.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.