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

Judge Stanley Bastian in the Eastern District of Washington state, an appointee of former President Barack Obama, granted the preliminary injunction concerning government funds known as Title X. The funds, which total $286 million a year, are given to medical facilities to pay for sexually transmitted infection testing, birth control, and cancer screenings for 4 million low-income people.

Bastian said he would block the rule following three hours of oral arguments, according to the Washington attorney general's office. Democratic Attorney General Bob Ferguson brought the suit alongside the National Family Planning and Reproductive Health Association.

The decision came two days after a federal judge in Oregon vowed he would also block the rules from taking effect, at least partially. Lawsuits have also been heard this week in Maine and last week in California by attorneys general and abortion providers.

Under the rules the Trump administration planned to put into effect May 3, healthcare facilities cannot get the grants unless they have a "physical and financial" separation of family planning services and abortion. They also are not allowed to have doctors who directly refer patients to abortions.

Organizations like Planned Parenthood 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. They say allocating federal funds for clinics such as Planned Parenthood frees those organizations to move money elsewhere and provide abortions. Planned Parenthood 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.