MADISON, Wis. (AP) — A federal appeals court on Wednesday overturned a lower court’s ruling halting an investigation into Wisconsin Gov. Scott Walker and more than two dozen conservative groups for alleged illegal campaign activity.

The ruling by the 7th U.S. Circuit Court of Appeals in Chicago is a defeat for Walker and conservatives who argued they have done nothing wrong and that the investigation is a partisan witch hunt designed to chill political speech.Walker is running for re-election this fall against Democrat Mary Burke and is considering a 2016 run for president.

Even with the ruling, the investigation won’t be able to resume immediately.

A state judge overseeing the probe also effectively stopped it in January when he issued a ruling quashing requested subpoenas, saying he did not believe anything illegal had transpired. That ruling is under appeal.

The 7th Circuit said in its 14-page ruling that state courts are the proper venue to resolve legal issues with the case. It also refused to make public eight documents that a coalition of media groups had wanted to be unsealed.

The first-term Republican made a national name for himself when he took on public sector unions in 2011 with his measure that effectively ended collective bargaining for most public workers. That fight led to the 2012 vote to recall Walker, which he won, making him the first governor in U.S. history to overcome a recall.

Walker has been dogged by secret investigations, first of aides and associates before he became governor and now on his recall campaign and other conservative groups.

Wisconsin Club for Growth and its director, Eric O’Keefe, filed a federal civil rights lawsuit in February to halt the latest investigation, which began in secret in 2012. They argued it was a violation of their First Amendment rights and an attempt to criminalize political speech.

No one has been charged in the latest probe and prosecutors have said Walker is not a target.

A federal judge in May sided with the group and issued a temporary injunction blocking the investigation. The appeals court overturned that ruling, calling it an abuse of discretion.

The case largely centers on the type of political activity being done by the conservative groups during the recall campaign and whether that work required them to follow state laws that bar coordination with candidates, requires disclosure of political donations and places limits on what can be collected.

Under Wisconsin law, third-party political groups are allowed to work together on campaign activity and engage in issue advocacy, but they are barred from coordinating that work with actual candidates.

Prosecutors have said in court filings that Walker and his top aides illegally raised money and coordinated campaign advertising and other activity with Wisconsin Club for Growth, the state Chamber of Commerce and more than two dozen other conservative groups during the 2011 and 2012 recalls.

Prosecutors argued that should have made the groups subject to state campaign finance laws.

The Wisconsin Club for Growth argues that coordinating with candidates on issue advocacy — communications that don’t expressly ask a voter to elect or defeat a candidate — is legal and not subject to regulation by the government.

___

Follow Scott Bauer on Twitter at https://twitter.com/sbauerAP