A federal judge blocked an Ohio law that would have allowed the state to divert public money from Planned Parenthood.

Planned Parenthood argued before U.S. Judge Michael Barrett that the law, which was set to take effect in May, violated the women's health and abortion provider's constitutional rights, the Associated Press reported. The reason was that the group was denied funds in retaliation for providing abortions.

Ohio contends it should have a right on where it sends its money for local health departments.

About 24 states have been trying to defund Planned Parenthood through different means, and some have either enacted or proposed such a measure.

In April, President Obama warned 10 states to not cut Medicaid funds to the organization due to objections.

Ohio's defunding law went into effect in May but the federal judge has been blocking implementation.

The blowback comes in response to a series of undercover videos from anti-abortion activist David Daleiden. He went undercover as a tissue company representative and spoke with Planned Parenthood on the donation and harvesting of aborted fetal body parts.

Planned Parenthood has not been charged with any crime related to the undercover incidents. It is illegal to profit from the sale of fetal tissue.