COLUMBUS, Ohio (AP) — An effort by Ohio’s attorney general to block an energy company and its affiliated entities from donating to lawmakers is an infringement of First Amendment rights, a judge ruled Friday.

A Franklin County judge denied Attorney General Dave Yost’s attempt to stop campaign contributions to Ohio lawmakers from First Energy while the House is considering a repeal of a $1.3 billion bailout of two nuclear plants formerly owned by the company’s subsidiary.

The lawsuit sought to freeze the assets of former House Speaker Larry Householder’s $1 million campaign fund and dissolve the dark money groups involved in the bribery scheme.

But Franklin County Common Pleas Court Judge Chris Brown noted in his ruling that blocking donations and other speech would be an infringement of the companies’ and individuals’ First Amendment rights.

“I don’t know that there’s any way, absent a judicial determination of criminal conduct, that I can prohibit future speech,” Brown wrote.

Yost said while he was disappointed in the outcome of the ruling, he appreciated the judge’s attention to the issues at hand.

The Republican attorney general brought the lawsuit last week, delivering on his promise to take the legal remedies necessary if the General Assembly could not do so in time. His goal is also to block Energy Harbor, the company now owning and operating the two plants, from collecting fees on electricity bills that were authorized through the now-tainted legislation.

Energy Harbor is the former FirstEnergy Solutions, a onetime subsidiary of FirstEnergy Corp.

FirstEnergy Corp. said in a statement Friday that it is pleased with the court ruling, adding that the state’s lawsuit “unjustly targets the company for lawfully engaging in the political process and supporting policy initiatives that matter to our customers, employees, communities, and shareholders.”

The House created a committee