A federal judge on Tuesday said that he would block the Trump administration from setting new rules that would have cut off millions of dollars in government funding from Planned Parenthood.

U.S. District Judge Michael McShane, a nominee of former President Barack Obama, said Tuesday he would grant a preliminary injunction, calling the rule a "ham-fisted approach to public health policy.'' The case landed in court after Oregon's and 20 other states' attorneys general, as well as the American Medical Association and Planned Parenthood, filed lawsuits.

The rule, which was set to go into effect May 3, concerns a $286 million-a-year grant, known as Title X, that pays for birth control, testing of sexually transmitted diseases, and cancer screenings for 4 million low-income people. It requires the "physical and financial" separation of family planning services and abortion, and does not allow doctors to directly refer patients for abortions.

[Related: Planned Parenthood reports performing more abortions, 332,757, in latest year]

“At the heart of this rule is an arrogant assumption that the government is better suited to direct women’s healthcare than their providers,” McShane said during the hearing, according to the Courthouse News Service. “The final rule would create such a financial strain on medical providers that, ironically, it would create a vacuum that would create substantially more abortions.”

The judge did not say whether he would rule to block the rule only in the states that had sued or apply it nationwide, but did say he will detail his plans when he publishes his written opinion.

Other related lawsuits are receiving a hearing this week, and California's lawsuit received a hearing last week. The Maine Family Planning Association will argue its case Wednesday before District Court Judge Lance Walker, who was appointed by President Trump. Another hearing is scheduled for Thursday in Washington state before U.S. District Court Judge Stanley Bastian, another Obama appointee.

[Also read: Supreme Court won't toss Planned Parenthood lawsuit against anti-abortion group that secretly taped them]

Organizations have said that in order to keep the Title X grants under the new rules they would need to build separate entrances and exits, construct new health centers, and hire a second staff of doctors, nurses, and administrative staff. The rule allows them a year to make the changes.

Federal funds are not permitted to pay for abortions except in the cases of rape, incest, or if a woman's pregnancy threatens her life. Abortion foes, however, have long fought for rules along the lines of those published by the Trump administration because they say allocating federal funds for clinics such as Planned Parenthood frees them up to move money elsewhere and provide abortions. The organization receives between $50 million and $60 million from Title X.

One of the main purposes of the proposal is to shift federal funds from Planned Parenthood and other organizations that provide abortions to community and rural health centers, or otherwise pressure Planned Parenthood and other facilities to stop providing abortions.