Lake County Judge John Sedia said in a ruling Thursday that Indiana's recently-enacted right to work law, which prohibits labor contracts that require workers to either join a union or pay dues to one, violates the state constitution.

Sedia said the law violates a provision that bars the delivery of services "without just compensation" because labor contracts require unions to represent all workers in a workplace, even those who do not pay dues.

Indiana Attorney General Greg Zoeller's office told the Associated Press the state will appeal the ruling directly to Indiana's Supreme Court.

It is usually the unions themselves that insist on contracts that cover all workers in a workplace. There is no constitutional provision against unions requesting "members only" contracts during negotiations with management.

Indiana adopted its right to work law in 2012, becoming the 23rd state to do so. It is part of recent wave of states, including Michigan and Wisconsin, that have adopted similar laws. Wisconsin's version extends only to public sector employees.

The laws are staunchly opposed by organized labor, which fears they will accelerate the movement's membership losses.