Efforts to shut down the nation's largest medical marijuana dispensary began in 2012, when federal agents posted a forfeiture notice on the Oakland Estuary store.
On Tuesday, after years of high-profile litigation, celebratory Oakland city officials and a lawyer for the licensed dispensary announced that federal prosecutors were dropping the case.
"There is a lot of gratitude because this has been a very expensive and time-consuming fight," said Henry G. Wykowski, who represented Harborside Health Center, which sells cannabis to more than 100,000 patients. "But we all feel vindicated."
A spokesman for the U.S. attorney in San Francisco declined to comment, citing "pending litigation."
Wykowski said Harborside has signed a stipulation for dismissal, and the case should be officially over within a week to 10 days. He said the stipulation required that Harborside bear its own legal costs and promise not to sue the federal government.
The end of the highly publicized legal battle follows growing public acceptance of medical cannabis and two years of federal budget amendments barring the Department of Justice from spending money on efforts that would interfere with state medical marijuana laws.
In October, a federal district judge in San Francisco interpreted the budget amendment as a prohibition on federal prosecutors from shutting down a Marin County dispensary that complied with state law.
Wykowski said the federal government initially appealed the ruling by U.S. Dist. Judge Charles Breyer, brother of Supreme Court Justice Stephen Breyer, but recently withdrew it. If it had been upheld by the U.S. 9th Circuit Court of Appeals, it would have affected Harborside and dispensaries in all Western states.
Federal prosecutors "saw the handwriting on the wall," he said.
"They tried to have us evicted. We won that," he said. "They tried to get an injunction to stop us from selling. We won on that."
Oakland tried to intervene in the case on behalf of the dispensary, but a federal judge decided in August that the city lacked the legal right to have a say in the case. The U.S. Supreme Court let that decision stand in March.
Still, Oakland officials attributed the resolution of the case to their strong support of the dispensary.
Oakland City Councilwoman Rebecca Kaplan noted that Harborside and other dispensaries generate $3 million in revenue annually to the city. She said Oakland was the first in the state to set up a permit program for dispensaries, which required they provide security.
"I am glad that Oakland's work on the federal case helped keep Harborside open during this dispute and heartened to know that the threat against them is now removed," Kaplan said.
More than 30 states have legalized cannabis for medical use, but marijuana remains illegal under federal law. The Obama administration told federal prosecutors in 2013 that enforcement efforts should be concentrated on cases involving violence, distribution to minors, the involvement of criminal enterprises, growing on federal lands and trafficking marijuana to states where it is illegal.
The case against Harborside was originally brought by former U.S. Atty. Melinda Haag, who resigned last year and was succeeded by Brian J. Stretch, a longtime prosecutor in the office.