A federal judge in New York has blocked a rule from the Trump administration that would allow doctors to refuse to perform abortions if it conflicts with their religious beliefs.

Obama-appointed District Judge Paul Engelmayer claimed that the rule “violated the Constitution’s spending clause by allowing the administration to cut off funds approved by Congress to providers who do not comply with the rule by forcing employees to perform services to which they object,” according to a report from The Hill.

The rule was scheduled to go into effect on November 22, but Planned Parenthood and the state of New York filed lawsuits to stop it. The lawsuits argued that it would “allow discrimination” in the name of religious freedom.

“Today’s decision is an important victory against the Trump Administration’s cruel and unlawful attempts to roll back critical patient protections,” Alexa Kolbi-Molinas, an attorney with the American Civil Liberties Union, said in a statement. “Everyone is entitled to their religious beliefs, but religious beliefs do not include a license to discriminate, to deny essential care, or to cause harm to others.”

TRENDING: HERE SHE COMES! Judge Amy Coney Barrett Seen Leaving Her House with Her Seven Kids and Husband! -- Announcement at 5 PM ET

The administration argued that the rule would protect the religious beliefs of doctos.

“This rule ensures that healthcare entities and professionals won’t be bullied out of the health care field because they decline to participate in actions that violate their conscience, including the taking of human life,” Department of Health and Human Services official Roger Severino said in May.