Federal prosecutor U.S. Attorney Melinda Haag began proceedings in July to shut down the Oakland, Calif, dispensary because it had grown too big. In turn, the city sued Haag and Attorney General Eric Holder in an attempt to keep Harborside's doors open.
Chief Magistrate Jude Maria-Elena James dismissed the suit Tuesday in a 10-page ruling that determined Haag had successfully proven the federal government was immune to the lawsuit under the Administrative Procedures Act, which allows federal agencies jurisdiction over regulations.
James ruled in January that Harborside could stay open while it battles the Department of Justice's attempt to close it down, pending a management hearing in March.
"We are, of course, disappointed in today’s ruling," said Steve DeAngelo, Harborside's executive director, in a statement. "In the meantime, Harborside will continue to provide our patients with the very best cannabis medicines we can find, in the safest and most beautiful environment we can create, with the very highest level of care and service."
Oakland argued a Harborside shutdown would hurt the health of thousands of residents--the store serves more than 100,000 patients and generates $3 million a year in tax revenue. Justice Department officials said the city was not qualified to argue the case because it did not own the building.
"We appreciate the ongoing support of our fellow citizens and elected officials, along with the fairness and thoroughness Judge James has exhibited throughout these proceedings," DeAngelo said. "We continue to look forward to our own day in court, and are confident that a Bay Area jury will recognize Harborside’s positive contributions and decline to shut our doors."
The court battle over Harborside is the latest skirmish in the ongoing fight between California, where marijuana has been legal for medicinal use since 1996, and the federal government, which still outlaws all sales and uses of the drug.
Since 2010, the Obama administration has stepped up its efforts against California's pot shops, and executed a massive raid of Los Angeles-area dispensaries in September.
California officials have stuck by marijuana growers and sellers, including an October court case in which a California judge determined collectives can sell the drug to their members even if they did not grow the marijuana themselves.
The federal position has grown even more complicated in the ensuing months, with Washington and Colorado voting to legalize marijuana for recreational use. The Department of Justice has so far avoided intervening, allowing the two states to begin implementing plans to regulate marijuana sales and consumption.
Harborside patients released a video last year, appealing to keep the pot megastore open.