SACRAMENTO — The California Senate on Monday approved a bill aimed at slowing a rush of cities and counties racing to ban marijuana cultivation.

The measure corrects what lawmakers say was a mistake in California's first comprehensive medical marijuana regulations, which were adopted in the closing hours of last year's legislative session.

A paragraph in that 70-page bill gave the state authority to license growers in jurisdictions that do not have their own laws on the books by March 1.

As a result, dozens of cities and counties seeking to preserve local control over pot have rushed to enact bans on marijuana growing before the deadline. Some apply only to commercial cultivation, but many would also prohibit personal pot gardens that have been legal — or at least overlooked — for 19 years.

"It is crucially important the deadline is repealed as soon as possible," said Assemblyman Jim Wood, D-Healdsburg, who was instrumental in writing last year's regulations and introduced the fix. "I am confident we will get this done soon."

The League of California Cities and the California Association of Police Chiefs, while supporting the fix, advised their members to enact cultivation bans ahead of the original cutoff date as a precaution.

The Senate backed AB21 in a 35-3 vote, sending it to the Assembly.

Sen. Jim Nelsen of Gerber, one of three Republicans who opposed the bill, said he can't support legislation that might help further entrench the medical marijuana industry.

"As a farmer, it's hard for me ... to legitimize medical marijuana by making it a bona fide agricultural endeavor," Nielsen said.

GOP Sens. Ted Gaines of Roseville and Mike Morrell of Rancho Cucamonga also opposed the bill.