MADISON, Wis. — In an off year for major elections in Wisconsin, one race in 2011 unexpectedly turned into a full-blown battle: David Prosser, a Supreme Court justice seen as part of the court’s conservative majority, was fighting for his seat against a more liberal opponent, JoAnne Kloppenburg, a little-known assistant attorney general.

The campaign became a referendum on efforts by the newly elected Republican governor, Scott Walker, to cut collective bargaining rights for most public workers, and money was pouring in. By the end, the Supreme Court race cost $5.7 million, including about $4.3 million in so-called issue ads paid for by outside groups. Justice Prosser defeated Ms. Kloppenburg by 7,004 votes, a result so close that a recount was conducted at taxpayer expense.

In the coming weeks, that outside campaign spending may be at issue again as the State Supreme Court considers whether an investigation can proceed into claims that Mr. Walker’s campaign improperly coordinated the spending by conservative groups during campaigns in 2011 and 2012 to recall him and state lawmakers after the collective bargaining cuts.

Several of the same outside groups that were accused of coordinating with Mr. Walker in the recall elections previously spent millions of dollars backing Justice Prosser, a former Republican state lawmaker, and his conservative colleagues in recent elections, according to an analysis by the Wisconsin Democracy Campaign, a nonpartisan group, though some of the outside groups dispute those findings.