SACRAMENTO — Californians on Thursday woke to the surprising news that, come November, they’ll get to decide whether their state should be the first to legalize marijuana. And with that news came one whopper of a question:

Dude . . . we can do that?

According to law professors and other experts, the answer is yes — but …

No matter what Californians decide, marijuana will still be illegal under federal law. That means a tangle of legal and political questions must be confronted before advocates can realize their dream of freely growing, selling and using marijuana everywhere in the Golden State.

First, voters have to sign off on what might be a contentious campaign — no sure thing, despite recent polls showing an upswing in support.

And complaints from neighboring states, whose residents could flock to California, may prove too loud for the White House to ignore. Federal prosecutors and drug agents, who have largely let state prosecutors handle drug crimes in recent decades, could begin to intervene in smaller-scale cases.

“The pressure on the Obama administration to try to block this or resist it is going to be enormous,” said Robert MacCoun, a UC Berkeley law professor and drug policy expert. “It’s very hard for a single state to pass a law like this and implement it.”

Moreover, experts say, approval of the referendum could trigger a backlash against Proposition 215, the state law that authorizes medicinal use of marijuana. While the Obama administration last year promised to turn a blind eye to sick people, even though medical marijuana also conflicts with federal law, it may not be willing to do the same when it comes to street-corner dealers and people who just want to get high.

Advocates on Thursday appeared more sanguine. “The federal government is going to allow the state of California to move forward with this,” said Salwa Ibrahim, spokeswoman for the pro-legalization campaign led by cannabis activist Richard Lee of Oakland. “We’re not worried about it.”

Added Assemblyman Tom Ammiano, D-San Francisco, sponsor of a separate decriminalization bill: “We do have the right to legalize, even with the federal law as it is.”

The initiative, officially the Regulate, Control and Tax Cannabis Act of 2010, was certified for November’s ballot Wednesday after backers turned in signatures from hundreds of thousands of voters.

If it’s approved, adults 21 and older would be permitted to possess up to an ounce of marijuana; anyone could grow up to 25 square feet of plants per residence; and local governments would be asked to craft rules on distributing and taxing marijuana. The Secretary of State’s Office said it would take effect the day after Election Day.

Both the governor’s office and the office of the state attorney general declined to comment on the initiative Thursday. Attorney General Jerry Brown, who also will appear on the November ballot as the Democratic nominee for governor, is charged with writing official ballot summaries for initiatives and told reporters he should remain neutral for that reason.

A White House spokesman also declined to comment, although the president and some administration officials have previously said they do not support legalization.

Supporters are emboldened in part by a Board of Equalization estimate that said marijuana tax revenue could add more than $1 billion to the state’s starved coffers — although some experts question that, saying few people likely would report marijuana sales on their federal income taxes for fear of prosecution.

“If other states do this, over time, that might affect Congress’ attitude, and the president’s,” said Vikram Amar, a law professor at UC Davis. “But until federal law changes, I wouldn’t advise someone to run the risk of getting thrown in federal jail.”