On the same day that a final version of a health care rule was announced, the city of San Francisco sued the Trump administration to keep it from taking effect.

Critics of President Donald Trump's so-called conscience rule for health care providers have said that it would allow health care workers to refuse to provide medical treatment to people, particularly women seeking abortions and LGBT Americans.

The Trump administration has said that the rule is needed to protect health care providers who object to certain procedures from discrimination.

San Francisco City Attorney Dennis Herrera announced the lawsuit on Thursday.

“At its core, this rule is about denying people medical care,” Herrera said in a statement. “This administration is willing to sacrifice patients' health and lives – particularly those of women and members of the LGBTQ community, and low-income families – to score right-wing political points. It's reprehensible.”

Herrera said that the city risks losing $1 billion in federal funding if San Francisco refuses to comply with the rule.

“Once again, the Trump administration is trying to bully local governments by threatening to withhold federal funds. That's not how American democracy works,” he said.

Roger Severino, director of the Office for Civil Rights at the U.S. Department of Health and Human Services, defended the rule in an interview with BuzzFeed News, saying that “patients want doctors who match their values.”

According to the Bay Area Reporter, the case names U.S. Secretary of Health and Human Services Alex Michael Azar II as a defendant in the lawsuit.

(Related: Nancy Pelosi: Trump's health care rule “greenlights” discrimination against LGBT Americans.)