Come November, Oregon voters will decide whether to legalize recreational marijuana, giving the state the authority to regulate and tax weed sales.

But Portland city leaders aren't waiting to grab a share of tax dollars from the cash crop.

In June, Mayor Charlie Hales began convening a 20-member city marijuana advisory committee. The Oregonian first reported last week that the committee is discussing when and where pot stores would be allowed to sell within city limits.

But WW has learned that the committee serves another purpose: It's crafting a city sales tax on marijuana.

"We have discussed that possibility," says Josh Alpert, Hales' director of strategic initiatives. "But we haven't waded into the conversation yet. There are issues that will need to be addressed, such as what will be the right tax amount, and what the legal ramifications are."

One legal detail is clear: The Portland City Council would need to pass its marijuana sales tax before voters approve the November ballot measure backed by New Approach Oregon.

That's because the measure's language specifically bars cities from collecting any taxes other than the state tax that would be imposed on growers—$35 an ounce on flowers and $10 an ounce on leaves.

Portland would be betting that if the council passes a sales tax before Oregonians legalize weed, the courts would rule the city's tax must be grandfathered into the new law. Hales' committee could bring a tax to the City Council by September.

That sets the stage for a battle over who gets coveted tax revenue from the newly legit grass industry. Hales' opposition could include state officials—and the backers of legal weed.

New Approach Oregon spokesman Peter Zuckerman says his group's measure prohibits additional city taxes to keep the price of legal weed competitive with the existing black market for marijuana.

"Local governments have the right to go to court to fight to raise taxes," Zuckerman says. "But if they do, they'll be violating the will of Oregon voters."

Portland officials got the idea to sneak a municipal weed tax under the wire from Ashland—the Southern Oregon town best known for its annual Shakespeare festival.

Ashland city councilors voted unanimously this month to authorize a tax of up to 10 percent on recreational weed, and up to 5 percent on medical pot. If Ashland finalizes that vote next week, it will become the first city in Oregon with a recreational marijuana tax.

Dave Kanner, Ashland's city administrator, says the city passed its weed tax hoping it will supersede any state ban.

"What we were thinking is, if we had our tax in place before this measure is passed, that language does not apply to us," Kanner says. "I'm not going to lay odds on it. But if we don't adopt the ordinance, we can't even make the argument."

Officials in both Portland and Ashland say they haven't estimated how much tax money they could collect from pot. An ECONorthwest study funded by the legalization campaign says the state could raise $38.5 million in the first year. (The measure says 40 percent of Oregon tax revenues will go to schools, and 35 percent to state and local police.)

This isn't the first time this year Portland has chased tax dollars from activities that are still illegal.

City officials cut a deal earlier this year with Web startup Airbnb to collect hotel taxes from its room rentals, which currently violate city code. The City Council is poised to legalize many Airbnb rentals—but more than half of the company's properties paying taxes will still be breaking city rules.

Alpert says Hales is looking for ways to offset the costs of regulating new economies.

"It is completely normal and expected for the city to look closely at potential revenue," Alpert says. "But bear in mind that most new funding sources come with added expense as well.â