MADISON, Wis. — The fight over Wisconsin Gov. Scott Walker’s signature policy achievement, a law effectively ending collective bargaining for most public employees, ended Thursday with the state Supreme Court declaring it to be constitutional.

Passage of the law in 2011 put Wisconsin at the center of a nationwide battle over union rights, as well as fueling Walker’s rise to national prominence and added him to the mix of possible 2016 presidential candidates.

Anger over the law led to Walker being forced to stand for recall in 2012; he won, making him the first governor in U.S. history to withstand such a vote.

Walker is up for re-election this November, the third time he will be on the ballot in four years.

The 5-2 state Supreme Court ruling is another major victory for Walker as he heads into the statewide election. Federal courts twice said the law, which limits public workers to bargaining only over base wage increases no greater than inflation, constitutional.

“No matter the limitations or ‘burdens’ a legislative enactment places on the collective bargaining process, collective bargaining remains a creation of legislative grace and not constitutional obligation,” Justice Michael Gableman wrote for the court’s conservative majority.

The law also requires public employees to contribute more toward their health insurance and pension costs, bars automatic withdrawals from members’ paychecks and requires annual elections to see if members want their unions to go on representing them.

In a two-sentence statement issued Thursday, Walker praised the ruling and claimed the law has saved taxpayers more than $3 billion – mostly attributable to schools and local governments saving more money because of the higher contributions.

“Today’s ruling is a victory for those hard-working taxpayers,” Walker said.

Walker’s opponent for re-election, Democrat Mary Burke, has a nuanced position on the law, which has upset some in her party who want it to be repealed entirely. Burke supports the higher employee contributions, and has said she does not want to repeal the full law, but she does support restoring collective bargaining.

Burke spokesman Joe Zepecki said in a statement that the decision doesn’t change the fact that Burke believes the election is about jobs.