SAN FRANCISCO -

An Oakland medical marijuana dispensary that bills itself as the world's largest gained an unusual ally Wednesday in its fight to stop federal prosecutors from shutting it down: the city government.

The city of Oakland filed a federal lawsuit in San Francisco that seeks to prevent the U.S. Department of Justice from using its property seizure powers to get Harborside Health Center evicted. The suit, thought to be the first a local government has brought on behalf of a pot shop, alleges the Justice Department knew about Harborside for years and exceeded the legal deadline for taking action against it.

"I strongly oppose federal actions against Oakland businesses that are complying with state and local laws and paying their fair share of taxes," City Attorney Barbara Parker said in a statement. "It is a tragic waste for the federal government to spend its time and resources cracking down on legitimate health care providers."

Harborside serves about 100,000 medical marijuana users a year, sells about $20 million worth of pot and marijuana products, and pays $3 million in federal, state and local taxes annually, of which about $1.2 million goes to Oakland, executive director Steve DeAngelo said. He called the city's intervention "heartening and encouraging."

U.S. Attorney Melinda Haag initiated a forfeiture proceeding in July on the property Harborside has rented in downtown Oakland since 2006, as well as its sister shop in San Jose. Haag said at the time that the dispensaries violate federal law by selling marijuana, even though medical marijuana is legal in California.

The owners of both properties have gone to state court to force out the dispensaries, but DeAngelo has counter-sued and so far been able to stay in business, said his lawyer, Henry Wykowski. DeAngelo, who has four years remaining on his Oakland lease, also is fighting the U.S. attorney's claims, and a hearing before a federal magistrate is scheduled for Nov. 1, Wykowski said.

Over the past year, Haag and California's three other federal prosecutors have brought similar actions against landlords throughout the state that lease space to dispensaries, most of which have been evicted or closed on their own.