The Republican-led West Virginia State Senate voted Thursday to pass a right-to-work law, but it is not clear if the proponents will have the votes necessary to override an expected veto from Democratic Gov. Earl Ray Tomblin.

The legislation, approved 17-16, would prohibit workers from being forced to join a union or pay it a regular fee as a condition of employment. If adopted, West Virginia would be the 27th state with such a law.

Proponents argue that the law would help attract businesses and economic development to the state, which has one of the weakest economies in the nation.

"I believe this is a critical first step toward bringing about the kind of change in West Virginia that is desperately needed to jump start our struggling economy," said Senate President Bill Cole, R-Mercer. "For far too many years, the status quo has held our state back, and today is an important step in moving West Virginia forward."

Critics, including Tomblin, charge that it is little more than an attempt to undermine union power.

If enacted, the law would go into effect on July 1. It would not affect any existing collective bargaining agreements, meaning that workers who currently must pay a fee to a union will still have to as long as their union's existing contract with their employer remains in effect. No contract negotiated after July 1 could require the fees though.

Republicans are just one vote short of the 18 needed in the state senate to override the expected veto and are trying to persuade some moderate Democrats to go along. The GOP is expected to have the needed votes in the lower house.

Ironically, for the GOP there is one open Senate seat as a result of Sen. Daniel Hall, R-Raleigh, accepting a lobbyist position with the National Rifle Association on Jan. 4.

That created a significant problem for passing the legislation. The state constitution says the replacement must come from the departing member's own party. However, Hall ran as a Democrat when he was elected in 2012 and later switched sides.

The West Virginia Democratic Party has filed a lawsuit arguing that it should get to pick the replacement since Hall was elected as a Democrat. The state Supreme Court heard oral arguments Tuesday.

Right-to-work activists have privately expressed anger over the timing of the NRA's offer to Hall.