The Kentucky Supreme Court has upheld the state’s “right-to-work” law, a measure that bans unionized companies from requiring workers to pay union dues.

The Republican-controlled legislature passed the law last year, saying that it would make Kentucky more attractive to businesses looking to relocate to the state. Unions quickly sued to try and block the legislation.

In a 4-3 ruling, the high court rejected the challenge. Justice Laurance VanMeter wrote that “the legislature is permitted to set the economic policy for the Commonwealth.”

“One does not need an advanced degree in labor economics to recognize that employers might be attracted to locate in a state where wages are lower as opposed to a state where wages are higher,” VanMeter wrote.

“The legislature can clearly make a policy decision that the Act might result in more jobs, albeit at lower wages, and that this result, in turn, might benefit the overall economic climate of Kentucky.”

Gov. Matt Bevin and other Republicans have touted the law as a factor in recent economic development initiatives, including Braidy Industries, a $1.3 billion aluminum plant planned for Greenup County.

Since the law passed, 16,000 Kentucky workers have opted out of paying union dues, according to an editorial published in the Wall Street Journal over the summer (the AFL-CIO has said that number is misleading and doesn’t account for factors like layoffs and plant closures).

In the dissenting opinion, Justice Michelle Keller argued that the court should have struck down the right-to-work law because it treats unionized companies differently than non-unionized ones, violating the state’s constitutional ban on “special legislation.”

“The methods and practices of those employers and employees associated with labor organizations are not only altered, but are extinguished going forward. The employers and employees not associated with labor organizations are left in the same position as they were prior to the [right-to-work act],” Keller wrote.

Bill Londrigan, president of the Kentucky State AFL-CIO, said in a statement that the union was disappointed in the decision.

“The majority opinion flies in the face of the undisputed fact that this law singles out labor unions and their thousands of members for unfair and discriminatory treatment and violates unions’ rights to equal protection under of the Kentucky Constitution,” Londrigan said. “This decision will further erode the wages and living standards of Kentucky’s working men and women which is the apparent purpose of the Act.”

Unions protested loudly when lawmakers considered the right-to-work legislation in January 2017, banging against the walls of the committee room while Bevin testified in favor of the measure.

Fred Zuckerman, president of Teamsters Local 89, said that the law diminishes the ability of workers to “protect themselves.”

“This case and the ‘right to work for less’ law prove, yet again, that elections have consequences,” Zuckerman wrote in a statement.

Andrew McNeill, director of conservative political group Americans For Prosperity, applauded the decision.

“Since this landmark legislation became law, we have seen the economy steadily up-tick and companies bring new investments into Kentucky. We are proud of our hardworking activists’ efforts to make right-to-work a reality,” McNeill wrote in a statement.

Ryland Barton is the Capitol bureau chief for Kentucky Public Radio.