The Obama administration took steps Wednesday to block states from cutting off federal family planning grants to Planned Parenthood, finalizing a rule that is to take effect just days before the inauguration of President-elect Donald Trump.

The rule stipulates that states may not prohibit an organization from participating in Title X — the state-federal program that gives out tens of millions of dollars for family planning — for any reason other than the organization’s ability to provide services. It is designed to undercut efforts in some states to withhold taxpayer money from Planned Parenthood, which offers a variety of health-care services, primarily to low-income women. While the money cannot be used for abortions, some conservative lawmakers have targeted the group because it also offers the procedure at some of its clinics.

Abortion rights groups lauded the rule but cautioned that it could be reversed by the next administration.

“President Obama has cemented his legacy as a champion for women’s health. This rule protects birth control, cancer screenings, STI testing and treatment, and other health care for millions of people,” Planned Parenthood President Cecile Richards said in a statement. “Yet this fight is not over.”

Indeed, abortion opponents in Congress criticized Obama and pledged swift action next year to reverse the measure and enact other abortion restrictions.

“We should not be surprised that his administration would lash out with 11th hour power grab on the way out the door, but I am certain this rule will not stand for long,” Rep. Diane Black (R-Tenn.) said in a statement. “Come next year, our pro-life majorities in Congress will be positioned to work with President-elect Trump … to not only roll back this latest overreach but also to enact new legal protections for these most vulnerable members of our society.”

Democrats promised to resist those efforts.

“I’m glad that the administration finalized a rule to ensure that quality of care, not partisan political beliefs, determine which providers get federal funding,” said Sen. Patty Murray (Wash.), the top-ranking Democrat on the Health, Education, Labor, and Pensions Committee. “I look forward to working as hard as I can to ensure it is fully implemented.”

What happens to Title X intimately affects Planned Parenthood and its patients. About 1.5 million people receive Title X-funded care through a clinic operated by Planned Parenthood, representing a third of all patients who participate in the program. Among the services funded by the program are cervical cancer screenings, breast exams and HIV tests.

While Trump has offered conflicting statements about his views of Planned Parenthood, he has pledged to support efforts to cut off public funding to the group so long as it offers abortions. He has nominated as his health and human services secretary Rep. Tom Price (R-Ga.), who is antiabortion and has supported measures to defund Planned Parenthood. And he has selected as his vice president Indiana Gov. Mike Pence (R), one of the country’s most forceful voices in favor of cutting off the group’s taxpayer support.

Some Republican-led states have tried to cut off Medicaid reimbursements to the organization, but have been blocked by the courts because federal law bars states from picking and choosing which organizations may serve Medicaid patients.

This post has been updated.