Two family planning organizations announced Tuesday that they will stop accepting money from the government program that pays for reproductive health services, the first exodus after the Trump administration told health clinics that they can no longer receive the federal funds if they give patients referrals for abortions.

The decisions, by Maine Family Planning and Planned Parenthood of Illinois, came less than 24 hours after the Department of Health and Human Services issued a notice late Monday that it was immediately enforcing the contentious new rule for the half-century-old family planning program.

The department proposed rule changes more than a year ago as part of a series of HHS policies appealing to abortion opponents and other social conservatives who are part of President Trump’s political base. Nearly two dozen state governments sued, as did nonprofit groups opposing the restrictions on abortion referrals, arguing that the rewritten rules are illegal and would harm the ability of low-income women to get many types of services from clinics that receive the federal funds.

Four federal district courts in Maryland and on the West Coast issued preliminary injunctions preventing the new rules from taking effect while the court cases played out. But the California-based U.S. Court of Appeals for the 9th Circuit overturned those decisions, allowing the Trump administration to move ahead with its rules before the lawsuits are resolved.

In a notice Monday, Diane Foley, an official in HHS’s Office of Population Affairs who oversees the family planning program, told Planned Parenthood affiliates, hospitals and state and local governments receiving the grants that the court “has made clear that HHS may begin enforcing the final rule.”

The changes affect the program known as Title X that has been the main form of federal aid for family planning services since its origins in 1970. The program gives $260 million to 90 recipients nationwide, with nearly half of that money provided to Planned Parenthood, a longtime target of antiabortion activists.

The grants help pay for contraception, fertility treatment, screening for cancer and sexually transmitted diseases and other services for millions of low-income patients. Federal law forbids the use of government money for abortion.

Under the rewritten rules, clinics may no longer refer patients for abortions, although they may still offer what the rule calls “nondirective counseling on abortion.”

Starting in March, clinics that offer abortion services will need to do so at separate locations from the services covered under the grants. And faith-based groups, which do not always offer all forms of birth control, are now encouraged to play a larger role in the program.

Travis Weber, vice president for policy with the conservative Family Research Council, called HHS’s notice “a major victory in restoring the intent of the law by clarifying that abortion is not a method of family planning.”

Rather than adhering to the restriction on abortion referrals, Planned Parenthood of Illinois announced Monday that it would stop accepting money from the program, forfeiting about $3 million.

“The changes to Title X are unethical and illegal,” said Julie Lynn, a Planned Parenthood of Illinois spokeswoman. “They violate medical ethics by forcing doctors to restrict the information they share with their patients, and that’s not something we would ever do.”

Maine Family Planning, that state’s only Title X participant, is taking a larger step, withdrawing from the program entirely rather than just refusing money for now, according to Clare Coleman, president of the National Family Planning and Reproductive Rights Association.

Two weeks ago, New York Mayor Bill de Blasio, a Democratic presidential candidate, said that the city’s nonprofit network of hospitals and clinics would forgo its $1.3 million in federal family planning funds if the abortion restriction took effect. New York did not immediately say anything further after the HHS notice.

Coleman said the notice caught organizations by surprise, because HHS officials had said in spring that they would provide detailed instructions on how to comply with the multipronged new rules, but no instructions appeared.

Tuesday was the start of a conference HHS is convening in Washington for family planning grantees, and the agenda does not include discussion of the new rules. Mia Heck, an HHS spokeswoman, said that “direction will be provided to them during the . . . conference this week.”

Coleman predicted that additional family planning organizations will stop accepting the federal money as lawsuits challenging the changes percolate in both federal district courts and appeals courts. The final verdict on the rules’ legality, she said, “is not yet at hand.”