SAN FRANCISCO — Hundreds of demonstrators gathered at City Hall here Tuesday to demand federal respect for state and local marijuana laws, a day after federal agents raided the state’s first pot trade school and a related dispensary across the bay in Oakland.

The San Francisco rally and march to a nearby federal building was planned before Monday’s raid. But the sweep on businesses owned by prominent marijuana activist Richard Lee emboldened protesters and brought denunciations from local officials and lawmakers in five states with medical cannabis laws.

Protesters heaped scorn on Melinda Haag, U.S. attorney for Northern California. “We are going to push back,” Stephanie Tucker, a San Francisco activist with the Medical Cannabis Task Force, told the whooping crowd Tuesday. “We’ve had enough after the hostile attack yesterday in Oakland.”

As Tucker led protesters in chants of “Our state. Our medicine. Our laws,” Lee, a paraplegic, sat quietly in his wheelchair, surrounded by well-wishers.

Monday’s federal search warrants targeted numerous properties, including Lee’s dispensary, apartment and Oaksterdam University — which since 2007 has taught about the business, cultivation and laws of marijuana. No arrests were made as part of a joint investigation by the IRS and Drug Enforcement Administration. Both agencies have declined to comment, saying records are under seal.

U.S. Rep. Barbara Lee (D-Oakland) said the raids caused her concern. “After the people of the state of California voted to make medicinal cannabis legal, thousands of small businesses have invested millions of dollars in building their businesses, created good-paying jobs and paid millions in taxes,” she said in a statement. “The business owners are doing everything they can to comply with the law, and they deserve clarification.”

She said she was working on several bills that would align federal law with state medical marijuana statutes.

Federal prosecutors have frequently targeted dispensaries that make profits, arguing that California law requires the stores to run as not-for-profit collectives. In practice, many make millions of dollars.

When Richard Lee spearheaded the legalization initiative, Proposition 19 in 2010, he said Oakland’s ordinance and state law were ambiguous enough that he could make money. At the time, Oakland allowed individuals to own dispensaries but allowed only “reasonable compensation,” not “excessive profits.”

Arturo Sanchez, Oakland deputy city administrator, said he believed from a review of Lee’s books that the compensation paid to staff and management was appropriate.

Lee has said he reinvests the income from his operations in efforts to mainstream marijuana. He spent $1.5 million to launch his campaign to pass the 2010 legalization measure.

By Tuesday, his Coffeeshop Blue Sky dispensary had reopened, thanks to emergency supplies from growers. The university is expected to reopen Wednesday.

“One way or another, Oaksterdam will live on,” Lee said quietly at the rally.

Lee said the IRS had a heavy presence at the raid, “so I think it was about the money.”

Lee’s attorney, Laurence Jeffrey Lichter, said in a phone interview his client is in “complete compliance” with state and local laws. He pointed out that federal authorities have made evictions and applied economic pressure in California but have yet to issue any indictments.

“I’m hoping what they did yesterday is like the IRS auditing him — that it’s an attempt to change his behavior, or to demonstrate to people surviving on this industry in a terrible economy that it’s Russian roulette,” said Lichter, who serves as Oaksterdam’s law dean.

Five members of San Francisco’s Board of Supervisors and representatives of state Assemblyman Tom Ammiano (D-San Francisco), state Sen. Mark Leno (D-San Francisco), and state Board of Equalization member Betty Yee told the crowd at City Hall that they would continue to press the cause with federal officials.

Dispensaries have brought “over $100 million to California’s coffers every year,” Yee’s chief deputy, Alan LoFaso, said to cheers.

In and outside of California, the raid riled state lawmakers who have worked on medical marijuana laws. Ammiano, who has written legislation that would permit and regulate sales statewide, joined Assemblyman Chris Norby (R-Fullerton) and legislators from Washington, New Mexico, Maine and Colorado in signing an open letter to federal officials.

“States with medical marijuana laws have chosen to embrace an approach that is based on science, reason and compassion,” the lawmakers wrote. “Unfortunately, these laws face a mounting level of federal hostility and confusing mixed messages from the Obama administration, the Department of Justice and the various United States attorneys.

“We call on the federal government not to interfere with our ability to control and regulate how medical marijuana is grown and distributed. Let us seek clarity rather than chaos. Don’t force patients underground, to fuel the illegal drug market.”

lee.romney@latimes.com

joe.mozingo@latimes.com

john.hoeffel@latimes.com

Romney reported from San Francisco and Hoeffel and Mozingo from Los Angeles.