MADISON, Wis. — Wisconsin's polarizing union rights law will take effect thanks to a divided ruling by the state Supreme Court.

The court ruled 4-3 that a judge overstepped her authority when she voided the Republican governor's plan to strip most public workers of their collective bargaining rights.

The ruling Tuesday evening was a major victory for Gov. Scott Walker. He said the law was needed to help address the state's $3.6 billion budget shortfall.

His proposal thrust Wisconsin to the forefront of a national debate over labor rights.

Walker claimed the law would give local governments enough flexibility on labor costs to deal with deep cuts to state aid. Democrats saw it as an attack on public employee unions, which usually back their party's candidates.