RALEIGH, N.C. (AP) — North Carolina’s hemp industry appears to have avoided a shutdown, as the General Assembly gave its final approval Wednesday to legislation that would make its products permanently exempt from the state’s controlled substances law.

The Senate voted 41-2 for a House measure that means the production and sale of industrial hemp and products derived from hemp like CBD can still be lawful. The bill now goes to Gov. Roy Cooper’s desk for his expected signature.

Without the approved language, North Carolina’s industrial hemp program — approved in 2015 as a pilot and now operated through a federal production program — would have to shut down at the end of June. Making the hemp exception permanent would allow the U.S. Department of Agriculture to continue operating the program.

There are more than 1,500 licensed hemp producers in the state, according to the state Department of Agriculture.

Both chambers had passed legislation containing the language, but House Republicans wouldn’t pass a broader Senate farm bill with the conforming hemp legislation. That “Farm Act” also received final legislative approval earlier Wednesday.

Many GOP members remain suspicious of hemp and CBD products — as reflected in the fact that more than two dozen Republicans in the chamber voted against the hemp measure that got final approval.

Sen. Brent Jackson, a Sampson County Republican, expressed frustration with his colleagues in the House for the delay, saying they had sent the language over to the House nearly a month ago.

The legislation differentiates marijuana, which would still remain unlawful, from hemp and hemp products, which contain a very low amount of the chemical that gives the high to marijuana users.