San Diego Mayor Bob Filner declared an end on Thursday to the city's legal war on medical pot with a letter to city authorities ordering civil prosecutors to "stop the crackdown on marijuana dispensaries."

Filner, a Democrat who was sworn in December 1, said in the letter sent to the police chief, city attorney and the city's Neighborhood Code Compliance Department that such shops could still be scrutinized for other code violations like any other business.

"Until we have a new set of regulations for medical marijuana distribution, I have asked the Neighborhood Code Compliance Department and the Police Department to temporarily halt all prosecutions of city zoning code violations when it comes to medical marijuana dispensaries," Filner said in a statement.

He added that he plans to bring a proposed ordinance on the matter to the city council soon to regulate marijuana dispensaries to close a regulatory gap that had allowed the shops to be prosecuted on zoning violations.

The announcement signals a sea change in dispensary prosecutions in California's second largest city, with a population of 1.3 million. In 2011, the city attorney launched code enforcement action lawsuits against more than 100 medical marijuana dispensaries and shut most of them down.

City Attorney Jan Goldsmith responded to Filner's call for an end to the prosecutions in a letter that said, "We will, of course, comply with that direction."

The move comes amid a growing federal-state battle over marijuana that intensified when states in the U.S. West and Northeast liberalized medical pot laws in recent years, setting the stage for voters in Colorado and Washington in November to approve legalizing recreational use of the drug as well.

The federal government holds that marijuana is an illegal drug liable to be abused and has cracked down on medical marijuana operations in California and other states where it is legal.

San Diego U.S. Attorney Laura Duffy sent a letter in August to the city of Del Mar warning that even city employees who "conduct activities mandated" by a proposed Del Mar medical marijuana ordinance were not immune from prosecution.

Duffy was traveling out of the district on Thursday and was unable to respond to media inquiries, her staff said.

Other cities, including Oakland and San Francisco, have sought to add zoning rules that allows such shops. In October, the city of Oakland sued the federal government to block U.S. authorities from closing down a prominent medical marijuana dispensary that is featured on a reality television show.

Eugene Davidovich, the spokesman for the San Diego chapter of Americans for Safe Access, applauded the mayor's move to end targeted prosecutions.

"I'm so hopeful that this is the end to these lawsuits and it will create a path to regulation of shops for the thousands of people who rely on this medicine," Davidovich said.