The Trump administration earlier this year finalized a rule banning organizations that get money through Title X — the nation’s only federal funding program dedicated to family planning — from providing or referring patients for abortions.

Now Planned Parenthood, which serves 40 percent of the country’s 4 million Title X patients, says it is leaving the program due to the regulation, known by some as the “domestic gag rule.”

“Due to an unethical and dangerous gag rule, the Trump administration has forced Planned Parenthood grantees out of Title X,” said Alexis McGill Johnson, acting president of Planned Parenthood Federation of America, in a call with reporters on Monday.

The rule has been the subject of court battles for months, but in July, the Ninth Circuit said the rule could go into effect while its challengers, including Planned Parenthood, fight it in court. And the Department of Health and Human Services gave all Title X grantees until August 19 to submit plans explaining how they would comply with the rule.

But Planned Parenthood says it will not stop referring for or providing abortions, and will instead exit the program, which could leave patients without access to family planning services.

“The impact will vary state by state, but at the end of the day what it will mean is that too many people will delay or go without care,” Johnson told Vox in a statement last Wednesday.

Anti-abortion groups have praised the Trump administration rule, arguing that groups that perform abortions shouldn’t get federal money. But Planned Parenthood has long argued that forcing Title X providers to stop referring for abortions is unfair to patients, depriving them of the full range of reproductive health options. The organization also says that the domestic gag rule is part of a larger attack by the Trump administration, not just on abortion rights, but on contraception too.

Planned Parenthood will pull out of the Title X program rather than follow the Trump administration’s “gag rule”

The Trump administration rule, finalized in March, requires providers that receive Title X funds be both physically and financially separate from any entity that provides or refers for abortions. That means that because some Planned Parenthood health centers perform abortions, all Planned Parenthood centers would be barred from getting Title X funding, which is intended to help low-income Americans and other underserved groups get contraception, STI testing, and other services.

Providers were already banned from using Title X money to pay for abortions, but Title X funding recipients could still perform abortions if they covered the costs with other funds.

The rule essentially gives two options to Planned Parenthood and other Title X grantees that perform abortions: They can stop offering or referring for the service, or they can stop accepting Title X money, potentially compromising their ability to offer family planning services to low-income patients.

Last week, Planned Parenthood filed a letter with the Ninth Circuit Court of Appeals, asking it to block the rule. If the court did not intervene, the group said, it would be forced to exit the program.

On Friday, the court denied Planned Parenthood’s request. So on Monday, the group announced that it would be leaving Title X.

Planned Parenthood has said the gag rule is both unethical and illegal, violating laws requiring that Title X patients get unbiased counseling about all their options for a pregnancy.

But the group says patients will also suffer when Planned Parenthood no longer gets funds from Title X. In Ohio, for instance, a mobile health care unit run by Planned Parenthood will have to cease operations, Johnson told Vox. Meanwhile, “in Minnesota and Vermont, where Planned Parenthood serves 90 to 100 percent of the Title X patients, wait times for appointments will skyrocket, and people will delay or go without care.”

Planned Parenthood will try to make up the budget shortfall through other funding sources, like donations, but “it is unrealistic to think grants or private donations can replace a decades-old federal program,” Johnson said.

Changes at the state level could provide a preview of what the public health impacts of the rule might look like. “In Iowa, STD rates have spiked after health center closures, and access is already diminished due to the state defunding Planned Parenthood’s services,” Johnson said. “In New Hampshire, since the state cut funding for STI testing and treatment in 2012, rates of gonorrhea and chlamydia spiked in the state.”

Anti-abortion groups, on the other hand, have praised the Trump administration rule. “We thank President Trump for taking decisive action to disentangle taxpayers from the big abortion industry led by Planned Parenthood,” said Marjorie Dannenfelser, president of Susan B. Anthony List, in a statement earlier this year.

Some anti-abortion advocates have argued that Planned Parenthood should stop performing abortions if it wants to offer other services.

“Planned Parenthood, our nation’s largest abortion provider, today made a choice not to separate its abortion operation from Title X services,” said Jeanne Mancini, president of the anti-abortion group March for Life, in a statement to media on Monday. “Planned Parenthood’s decision today doubles down on their ultimate goal, which is political abortion advocacy, not healthcare.”

But Planned Parenthood and other reproductive health advocates see the Trump administration rule as part of a larger attempt to restrict not just abortion, but contraception as well. They point to the fact that the administration awarded a $1.7 million grant this year to the anti-abortion group Obria, which offers training on the rhythm method and has promised “to never provide hormonal contraception.”

“The Trump administration is targeting providers like Planned Parenthood in an attempt to end access to birth control and other reproductive health care,” Johnson said in a statement last week. “This is a blatant assault on our health and rights, and we will not stand for it.”

The gag rule is the subject of several ongoing legal challenges, and oral arguments in the case before the Ninth Circuit are scheduled to take place the week of September 23.