(Reuters) - The Kentucky Supreme Court has upheld the state’s so-called “right-to-work” law, which makes it illegal to require workers to join unions and bars the collection of fees from private-sector workers who choose not to become union members.

FILE PHOTO: A worker assembles a vehicle at a truck plant in Louisville, Kentucky, September 30, 2016. REUTERS/Bryan Woolston/File Photo

Rejecting a challenge by the Kentucky AFL-CIO and other unions, the court in a 4-3 decision on Thursday said the promotion of economic development and job growth formed the “rational basis” that the state needed to justify passing the law. The law, which took effect last year, allows workers who do not join unions to receive union-negotiated benefits without paying dues.

Nearly 30 U.S. states have passed “right to work” laws, and none have been struck down by courts. Voters in Missouri in August decided to reject a proposed right-to-work law, marking the first time such a measure was defeated at the polls.

Kentucky state officials did not immediately respond to requests for comment. Neither did the unions that challenged the law.

The unions claimed the law violated the state’s constitution by discriminating against unions. They also said the state legislature had no reason to designate the measure as “emergency legislation,” which allowed it to be signed into law within days of its passage.

But the Kentucky Supreme Court said it had little authority to question what constitutes an “emergency.” It was reasonable for the state to pass a law that only applied to unions because of their significant economic impact, the court said.

“The legislature clearly established a rational basis for the act: to promote economic development, to promote job growth, and to remove Kentucky’s economic disadvantages in competing with neighboring states,” Judge Laurance Vanmeter wrote for the court.

Republicans in Kentucky had been trying to pass the right-to -work law for nearly two decades. The legislation was passed in January 2017, two months after Republicans won control of the state’s General Assembly for the first time since 1921.

Supporters of the law say it will spur economic growth and attract new businesses to the state. Opponents see it as an assault on organized labor and blue-collar workers that will limit union revenues and erode wages, benefits and workplace safety.

The judges who dissented on Thursday said that because Kentucky’s law treats union employers and workers differently than non-union businesses and employees, it violates a provision of the state constitution guaranteeing equal protection under the law.

The case is Zuckerman v. Bevin, Kentucky Supreme Court, No. 2018-SC-000097-TG.