Ohio must continue to provide certain funding to Planned Parenthood while a state law aimed at keeping public money from going to the organization is being challenged, a federal judge ruled Monday.

U.S. District Judge Michael Barrett granted a temporary order that blocks the state from diverting funding from Planned Parenthood affiliates around Ohio.

The state law targets the roughly $1.3 million in funding that Planned Parenthood gets through Ohio’s health department. That money, which is mostly federal, supports certain education and prevention programs. The law would bar such funds from going to entities that perform or promote abortions.

The restrictions, which had been slated to take effect Monday, were signed into law by Republican Gov. John Kasich in February during his presidential bid. The temporary restraining order lasts two weeks unless it’s extended by the court, which could consider the still-pending request for a longer-lasting injunction.

Planned Parenthood is suing the state, claiming the new law violates their constitutional rights by denying them the funds “in retaliation for” providing abortions. The lawsuit names the state’s health director as a defendant.

The Ohio attorney general’s office, which represents the state, “will vigorously defend Ohio’s right to determine how to allocate its public funding as this case proceeds,” spokesman Dan Tierney said. A spokeswoman for the Ohio Department of Health said it had no further comment.

Planned Parenthood officials in Ohio and nationally applauded the judge’s decision, calling it a victory for thousands of people who get care from the organization.

“If you have a lump in your breast or need an HIV test, lawmakers should be making it easier, not harder, to get the care you need,” Jerry Lawson, CEO of Planned Parenthood Southwest Ohio, said in a statement.

Planned Parenthood says Ohio’s law would not force any of its 28 health centers in the state to close, but the legislation would deprive thousands of patients of access to HIV tests, breast and cervical cancer screenings, and other prevention and education initiatives.

“Even if other health care providers are eventually able to provide similar services, many patients’ health care and access to other services will be disrupted because other providers are not prepared to assume responsibility for those services,” the organization said in the lawsuit.

Planned Parenthood is a national target because of its role as the largest U.S. abortion provider and a series of undercover videos, shot by conservative activists, that purported to show executives for the organization negotiating the illegal sale to researchers of tissue from aborted fetuses. Planned Parenthood has denied the allegation and some state-level investigations have concluded it was unfounded and that the videos had been deceptively edited.

Federal law and the laws of most states already prevent public money from paying for abortions except in rare circumstances, but the recent defunding bills prohibit state money for any services by an organization that also provides abortions.

According to Planned Parenthood, politicians in 24 states have either enacted or proposed measures since last July that target the organization with defunding.