By Brendan O'Brien

MILWAUKEE (Reuters) - A Wisconsin judge on Friday struck down the state's right-to-work law, saying the measure is unconstitutional by banning unions from charging fees to non-union workers for certain services, court papers showed.

Dane County Judge William Foust decided in favor of International Association of Machinists, United Steelworkers and the AFL-CIO, which filed a lawsuit against the state, arguing the law passed in 2015 by Republican lawmakers violates the state constitution.

Before the right-to-work law was passed in Wisconsin, workers who chose not to be a member of a union at their workplace were still charged a fee to cover collective bargaining, contract administration and other services.

The law prohibits these fees and, as a result, allows the "taking of the plaintiff's property without just compensation in violation" of the state constitution, Foust wrote in his decision.

Attorney General Brad Schimel said in a statement that he will appeal the decision.

"We are extremely disappointed that the Dane County Circuit Court struck down Wisconsin's right-to-work law," he said.

In 2015, the legislation was spearheaded by state Republican lawmakers, including former U.S. presidential candidate Wisconsin Governor Scott Walker.

"Today, the courts put a needed check on Scott Walker's attacks on working families by ruling that Wisconsin's right-to-work law is in violation of our state constitution," said Phil Neuenfeldt, President of Wisconsin AFL-CIO, in a statement.

Walker drew accolades from conservatives across the nation in 2011 when he ushered through legislation curtailing the powers of most public-sector unions in Wisconsin amid large protests at the state capitol in Madison.

Similar but much smaller protests ensued during the passage of the right-to-work measure in Wisconsin, which made it the 25th U.S. state to have such a measure on the books.

Conservative support for the law helped catapult Walker onto the national scene and propelled his campaign for the 2016 U.S. presidential election before he bowed out in September.

(Reporting by Brendan O'Brien in Milwaukee; Editing by Diane Craft)