A federal appeals court ruled Monday in favor of a polarizing Trump administration policy that bans federally funded family planning centers from referring women for abortions.

The 7-4 decision by the California-based U.S. Court of Appeals for the 9th Circuit delighted social conservatives who are central to President Donald Trump’s political base. It infuriated civil libertarians, Planned Parenthood and other reproductive rights groups and more than 20 states that had filed lawsuits to try to block the rule.

The 82-page opinion dismissed the concerns of three lower courts on the West Coast that did not rule on the merits of the change in the family planning program, known as Title X, but that were leery enough of it that each issued an injunction last spring preventing it from taking effect.

Last summer, the 9th Circuit lifted those injunctions in California, Oregon and Washington state, allowing federal health officials to proceed with the policy.

Monday’s ruling is the first substantive court decision on a move by the Department of Health and Human Services that intensified a long-brewing antagonism between social conservatives on one side and Planned Parenthood Federation of America and other family planning groups on the other.

Under federal law, health-care groups were already barred from using federal funds for abortion services. The rule issued by the HHS a year ago went further, forbidding health centers that provide abortions or refer patients for abortions elsewhere from receiving any money through the half-century-old family planning program – a change that critics lambasted as a “gag rule.” The rule also requires health centers to erect “clear physical and financial separation” between services funded by the program and other activities.

Health centers still are allowed to provide “nondirective pregnancy counseling, including nondirective counseling on abortion” but do not have to do so.

HHS officials set an August deadline for clinics to report their plans to comply. Days before the deadline, Planned Parenthood withdrew from Title X, leaving more than 1 million low-income women without their regular source of care.

Monday’s majority opinion noted that since Title X began in 1970, its rules regarding abortion referrals have seesawed back and forth, depending on the political party of the administration in power.

The opinion, written by Judge Sandra Ikuda, appointed to the court by President George W. Bush, said the Trump administration’s rule is slightly less restrictive than a 1988 version upheld by the Supreme Court. The decision also says the rule’s separation requirement is not arbitrary or capricious, rejecting opponents’ argument that the HHS had neglected to consider potential harm to clinics and patients.

In a four-paragraph dissent, Judge Richard Paez, an appointee of President Bill Clinton, wrote, “In vacating the district courts’ preliminary injunctions, the majority sanctions the agency’s gross overreach and puts its own policy preferences before the law. Women and their families will suffer for it.” Paez was joined by three fellow judges.

A Justice Department spokeswoman, Mollie Timmons, said in a statement, “We are pleased by the . . . decision upholding HHS’s rule forbidding the use of taxpayer money to subsidize abortion through Title X grants. Congress has long prohibited the use of Title X funds in programs where abortion is a method of family planning and HHS’s recent rule makes that longstanding prohibition a reality. We look forward to continuing to defend this vital rule against all challenges.”

HHS spokeswoman Katie McKeogh, said in a statement, “This rule is not a ‘gag rule.’ Rather, HHS aims to ensure the integrity of the program so that more women and men are provided services that help them consider and achieve both their short-term and long-term family planning needs.”

Critics blasted the ruling. Ruth Harlow, senior staff attorney at the ACLU Reproductive Freedom Project, said in an interview that the decision “is quite devastating to the Title X program and patients.” The ACLU was part of the lawsuit in Washington state.

Harlow said a decision had not been made whether to appeal the 9th Circuit ruling but added, “This is something we want to fight to the end.” An appeal could request that the entire 9th Circuit review the ruling of the 11-judge panel, or that the Supreme Court take the case.

Alexis McGill Johnson, Planned Parenthood’s acting president, reiterated the group’s contention that it had been “forced out” of Title X because it would not comply with the administration’s rules. She said in a statement that the organization’s patients had accounted for 40% of everyone served through Title X grants.

She said 15 states have lost Planned Parenthood clinics or other health centers to which the group gave grants through its Title X allotment, and a half-dozen states no longer have any services funded through the federal program. They include Washington state and Oregon – where suits were filed – as well as Hawaii, Maine, Utah and Vermont.