SAN FRANCISCO — Two men walked out of Ed Rosenthal's appeal hearing Tuesday and immediately lit up a marijuana pipe, underscoring the conflict the renowned pot advocate still crusades to resolve.

"I want to change these laws and the enforcement of these laws; that's what this is all about," Rosenthal, 60, said after Tuesday's hourlong hearing before a three-judge panel of the 9th U.S. Circuit Court of Appeals.

"I was an officer of the city of Oakland; I was told by the city attorney's office I was immune from prosecution," he told reporters. "If you can't rely on government officials, who can you rely on?"

Famed for his marijuana cultivation books and the "Ask Ed" column he used to write for High Times magazine, Rosenthal was convicted of three marijuana-growing felonies in 2003, more than a year after federal agents raided sites including his Oakland home, an Oakland warehouse in which he was growing marijuana and a SanFrancisco medical marijuana club he was supplying.

Attorney Dennis Riordan told circuit judges Tuesday the self-styled "guru of ganja" was denied due process when U.S. District Judge Charles Breyer refused him immunity from prosecution under a statute protecting duly appointed state and local government "officers" and again when Breyer wouldn't let him present his good-faith belief in his immunity as an affirmative defense — that is, "I did it, but here's why" — at trial.

Riordan argued Breyer even took note of Rosenthal's honest, credible and reasonable belief in his own immunity as a mitigating factor at sentencing. Breyer sentenced Rosenthal to one day behind bars, time already served. If it was applicable at sentencing, Riordan said, it should have been viable as an "entrapment-by-estoppel" defense.

Circuit Judge Marsha Berzon questioned Riordan on what the phrase "lawfully engaged" means in the context of the immunity statute. Riordan argued that it must protect state and local officials from federal law; if federal law wasn't being violated, there would be no need for an immunity statute at all.

Assistant U.S. Attorney Amber Rosen argued the immunity statute is meant to apply to law enforcement officers who deal with illegal drugs, not people who are "deputized" by local governments to implement laws that directly conflict with federal law. And only a federal official, not a state or local official, could have invested Rosenthal with a good-faith belief that he was immunized from federal law, she said.

Joseph Elford, another of Rosenthal's attorneys, argued Rosenthal also deserves a new trial because of juror misconduct. During deliberations, a juror troubled by the idea of convicting Rosenthal consulted a friend — who happened to be an attorney — and was advised that she could "get in trouble" for deviating from the judge's instructions. She shared that advice with another juror.

Raising the specter of punishment for a juror is a kind of coercion, Elford said. Berzon questioned whether any prejudice is involved in "coercing" a juror to do what the law requires; Elford replied that it foreclosed the juror from exercising her power to "nullify," or ignore the judge's instructions and vote her conscience.

But Rosen argued that the advice given to the juror in no way compromised Rosenthal's right to a fair trial on the evidence and the law, and therefore isn't grounds for reversal.

Berzon and Senior Circuit Judge Betty Fletcher questioned Rosen on the government's argument that Breyer was unreasonable in sentencing Rosenthal to just one day in prison when federal sentencing guidelines called for at least several years behind bars. Rosen acknowledged the guidelines no longer are mandatory, and the circuit judges seemed reluctant to second-guess Breyer's judgment.

The attorneys also argued over whether prosecutor George Bevan committed misconduct when discussing the investigation's aims with grand jurors who eventually indicted Rosenthal. Rosenthal's attorneys claim Bevan lied about not targeting medical marijuana clubs.

The appeals panel will render a decision in the next few months.