SAN JOSE, Calif. (AP) — Worried that California might legalize recreational marijuana, the state’s third-largest city by population has voted to ban cannabis sales ahead of Tuesday’s election.

San Jose isn’t alone in scrambling to block the possible effects of Proposition 64, which would legalize cannabis but also allow local bans on sales.

Dozens of cities and counties from tiny Blue Lake in the heart of Northern California’s marijuana-growing mecca to National City near the Mexico border have either imposed or are contemplating tough restrictions on recreational marijuana sales and cultivation.

“Some are doing it out of an over-abundance of caution.”

Tim Cromartie, League of California Cities lobbyist

However, under Proposition 64, which is winning in polls, local governments would not be able to prohibit people 21 and older from having up to six marijuana plants for personal use and possessing up to an ounce of cannabis.

City Council members in San Jose, with a population of a million people, said they passed the temporary ban Tuesday to give city officials time to develop regulations for sales and farming. Its ban includes a prohibition on outdoor gardens.

RELATED STORY

Cannabis Regulation in the Wild West: What We Can Learn From San Jose

Most provisions of Proposition 64 wouldn’t kick in until 2018 if it’s approved by a majority of voters.

Tim Cromartie, a lobbyist with the League of California Cities, said cities have months to create their own restrictions and don’t need to hastily pass bans.

“There is no need for a stampede,” Cromartie said. “Some are doing it out of an over-abundance of caution.”

Some cities along with Kings County about 200 miles south of San Francisco have imposed strict prohibitions they intend to keep in place.

“It’s a gateway drug and it’s still illegal under federal law,” said Kings County Supervisor Craig Pedersen, asserting that the social ills of marijuana outweigh any tax benefits to government. “This is still a very conservative community.”

RELATED STORY

U.S. Attorney General Says Cannabis Is Not a Gateway Drug

Officials in other communities such as Blue Lake say they may revisit the issue after further study.

“I don’t think cities were given the opportunity to put regulations into place,” said Blue Lake Mayor Michelle McCall-Wallace. “It all came pretty quickly and we didn’t have time to study the zoning issues.”

The proposition seeks approval and regulation of the recreational marijuana industry, from planting seeds to smoking buds. It would levy a 15 percent state sales tax and require farmers to pay $9.25 for every ounce of marijuana or 8 grams of concentrate sold.

Cities and counties could add their own taxes and regulations.

Some 23 California cities and five counties have formally called for voters to defeat Proposition 64. It’s also opposed by many law enforcement agencies and organizations that say marijuana attracts crime and impairs drivers.

After medical marijuana was legalized in 1996, roughly 150 cities banned related farms and businesses, the League of California Cities estimated. The organization was unsure how many cities have enacted bans ahead of the vote on Proposition 64.

RELATED STORY

Behind the Big Ban: Why California Towns Are Scrambling to Oust Dispensaries

Sierra County voters were being asked to adopt a ban on Tuesday. In San Diego County, the cities of San Marcos, Santee and National City have outlawed marijuana.

“Better for us,” said Jose Castro, 65, a retired auto mechanic in National City, which approved its ban last week. “Marijuana brings with it so many problems. The city is just trying to protect us.”

Others, though, see a missed opportunity for tax revenue.

“They can do what they want but they’re going to lose money,” said Memo Guerrero, 26, an unemployed National City resident. “And if it passes, they’ll be going against the whole state. It’s kind of weird.”