LOUISVILLE, Ky. (WDRB) --  A state court judge has dismissed a lawsuit challenging the legality of the "right to work" law passed by the Republican-controlled legislature last year.

In the suit, Kentucky unions argued the law violates their constitutional rights and that lawmakers improperly labeled it "emergency" legislation so it could take effect immediately with Gov. Matt Bevin's signature on Jan. 9, 2017.

But Franklin Circuit Court Judge Thomas Wingate rejected those arguments in a decision dated Tuesday.

"The Court's ruling confirmed what we already knew: Kentucky's right-to-work law rests on a sound legal bedrock and is an essential economic driver for our state, bringing unprecedented job growth and a record $9.2 billion in corporate investment in 2017," Bevin said in a statement Wednesday.

The governor was referring to announcements by companies of their intentions to invest in factories and other job-producing projects in the state over the next several years.

"This weak attempt to stop Kentucky's economic growth through legal challenges has been appropriately smacked down," Bevin said.

The Kentucky AFL-CIO, an umbrella group for unions, and Teamsters Local 89 of Louisville will immediately appeal the decision, AFL-CIO President Bill Londrigan said in a statement Wednesday.

"We believe our higher courts will recognize the harmful effect that this unjust and discriminatory law has on our workers and their unions which are required union federal law to represent all workers in a bargaining unit including those who choose to withhold dues and fees," Londrigan said. 

Despite the "emergency" clause putting the law into effect immediately, its impact will be phased over several years.

That's because it only applies to new union contracts or ones that are renewed after Jan. 9, 2017. Several workplaces have contracts that predate the law and remain in effect. 

Copyright 2018 WDRB Media. All rights reserved.