CHICAGO (Reuters) - A Wisconsin appeals court on Tuesday upheld the state’s “right-to-work” law, which bars mandatory union membership and prohibits unions or employers from requiring non-members to pay dues.

The decision by the state’s 3rd District Court of Appeals overturned a lower-court ruling from 2016 finding it violated the state constitution. In July, the 7th U.S. Circuit Court of Appeals in Chicago threw out a similar federal challenge and also ruled the law constitutional.

The 2015 law has been in effect during the legal challenges.

Lawyers for the Wisconsin AFL-CIO, the International Associations of Machinists and United Steelworkers, who brought the case, could not be immediately reached ON Tuesday. The ruling could be appealed to the state’s Supreme Court.

It marked a win for Wisconsin Republican Governor Scott Walker, who emerged as a leading union antagonist during a 2011 fight over legislation to roll back public employee collective bargaining rights and has championed the right-to-work law.

When it was enacted, it drew thousands of protesters to Madison, the state capitol.

Twenty-eight states have passed right-to-work legislation, according to the National Right to Work Legal Defense Foundation, which opposes union organizing.