California advanced a bill on Thursday that would renew licenses for the state’s legal weed growers.

Right now, nearly 7,000 small pot farms in California risk losing their licenses without the extension. By law, California stopped issuing the licenses in December, and current ones expire in July, which could force some growers into the black market and collapse the state’s newly-legal weed industry.

Last month, 1,000 temporary licenses expired, and another 4,000 will expire this month if the bill isn’t signed into law soon, reported The Press Democrat.

The bill’s sponsor, Sen. Mike McGuire, said the measure was necessary “to avoid an impending crisis,” according to KTLA5 News.

If Thursday’s 32-4 vote in the Senate is any indication, the bill, titled SB 67, has a good chance of clearing the state Assembly. If the bill scores enough votes in the Assembly, it will make its way to the governor’s desk for signing.

California recently deployed its National Guard to crack down on illicit pot operations. Some industry leaders and legislators believe black marketeers threaten the state’s regulated cannabis industry.

But other industry leaders placed the blame on unnecessarily complex regulations.

“The system of temporary permits and to annual permits is kind of in major disarray at this point,” Michael Katz, a co-founder of Emerald Exchange, told CNBC earlier this week. “Instead of putting on a show and taking out the National Guard, there’s a lot of regulatory fixes that we think should be offered to help more cultivators enter the regulated space.”

California voters approved of recreational weed in 2016, and the state launched its first commercial sales on January 1st, 2018.

Initially, the state only granted temporary licenses for cultivators, but those were supposed to be phased out by annual licenses, which state officials have been slow to issue.

Follow Randy Robinson on Twitter