Discuss as:

Judge strikes down Wisconsin law restricting union rights

AP file

The law championed by Wisconsin Gov. Scott Walker prohibited state and local governments from bargaining over anything except cost of living adjustments to salaries.

A Wisconsin judge on Friday struck down the state law championed by Gov. Scott Walker that effectively ended collective bargaining rights for most public workers.

Dane County Circuit Judge Juan Colas ruled Friday that the law violates the state and U.S. constitutions and is null and void.

The law took away nearly all collective bargaining rights from most workers and has been in effect for more than a year.

Colas' ruling comes after a lawsuit brought by the Madison teachers union and a union for Milwaukee city employees.

For city, county and school workers, the ruling returns the law to its previous status, before it was changed in March 2011, the Milwaukee Journal-Sentinel reported. However, Walker's law remains largely in force for state workers, it reported.

Walker's law prohibited state and local governments from bargaining over anything except cost of living adjustments to salaries. Haggling over issues such as health benefits, pensions and workplace safety was barred.

Gov. Walker said in a statement Friday that he expected the ruling will be overturned on appeal.

"The people of Wisconsin clearly spoke on June 5th," he said in the statement posted on his Facebook page. "Now, they are ready to move on. Sadly a liberal activist judge in Dane County wants to go backwards and take away the lawmaking responsibilities of the legislature and the governor. We are confident that the state will ultimately prevail in the appeals process."

"We believe the law is constitutional," said Wisconsin Department of Justice spokeswoman Dana Brueck.

The proposal was introduced shortly after Walker took office in February last year. It sparked a firestorm of opposition and huge protests at the state Capitol that lasted for weeks. All 14 Democratic state senators fled to Illinois for three weeks in an ultimately failed attempt to stop the law's passage by the Republican-controlled Legislature.

The law's passage led to a mass movement to recall Walker from office, but he survived the recall election, becoming the first governor in U.S. history to do so.

The Associated Press contributed to this report.

More content from NBCNews.com:

Follow US News from NBCNews.com on Twitter and Facebook

Follow Kari Huus on Facebook