The justices cited free speech in effectively tossing out the case, ruling state election law is overbroad and vague in defining what amounts to "political purposes."

The court's action is a major victory for Walker as he pursues the presidency, though one expert said prosecutors could appeal to the U.S. Supreme Court. No one has been charged in the so-called John Doe probe, Wisconsin's version of a grand jury investigation in which information is tightly controlled. Questions about the investigation have dogged Walker for months.

The case centers on political activity conducted by Wisconsin Club for Growth and other conservative organizations during the 2012 recall, which was spurred by Democrats' anger over a Walker-authored law that effectively ending collective bargaining for most public workers.

Prosecutors accused Walker and the groups of illegally coordinating their campaign efforts in violation of state law. They denied wrongdoing.

Justice Michael Gableman wrote that prosecutors alleged the groups and the campaign illegally coordinated on issue advocacy, communications that don't expressly call for a candidate's defeat or victory. Gableman wrote that Wisconsin's campaign finance law is unconstitutionally vague about what amounts to coordinating for political purposes.

He said "political purposes" must be limited to express advocacy, that is, advertisements and communications that clearly call on voters to defeat or elect a specific candidate. With that limitation in place, the law doesn't prohibit any of the coordination the prosecutors believe was illegal.

"To be clear, this conclusion ends the John Doe investigation because the ... prosecutor's legal theory is unsupported in either reason or law," Gableman wrote. "Consequently, the investigation is closed."

Justice Shirley Abrahamson, one of two liberals on the seven-member court, sharply disagreed in a dissent that accused the majority of a faulty interpretation of state law.

"The majority opinion delivers a significant blow to Wisconsin's campaign finance law and to its paramount objectives of `stimulating vigorous campaigns on a fair and equal basis' and providing for `a better informed electorate,"' Abrahamson wrote.

Republicans had called the investigation, launched by Milwaukee County District Attorney John Chisholm, a Democrat, a partisan witch hunt. Wisconsin Club for Growth and its director, Eric O'Keefe, filed a federal civil rights lawsuit last year seeking to halt the probe, arguing the investigation violates their free speech rights. U.S. District Judge Rudolph Randa sided with the club but a federal appellate court later tossed out the lawsuit, saying the issue belonged in state courts.

The club and O'Keefe then turned to the state Supreme Court, which is controlled by a four-justice conservative majority.

Howard Schweber, an associate professor of political science and legal studies at the University of Wisconsin-Madison, said before the ruling that prosecutors could seek review by the U.S. Supreme Court, possibly arguing bias, if they lost. Lead prosecutor Francis Schmitz in February asked at least two justices to recuse themselves to avoid the appearance of impropriety, but the justices didn't respond.