View more videos at: http://nbclosangeles.com.

LOS ANGELES -- While Los Angeles officials were working out exactly how to phrase a letter to 762 registered pot dispensaries ordering them to shut down, medical marijuana advocates vowed Wednesday to overturn the City Council's newly approved ban on the stores.

The ban was approved unanimously on Tuesday after hours of debate and years of consternation over the growing number of pot shops in the city.

The council's action followed a seemingly contradictory 9-5 vote on a proposal that would allow 182 marijuana dispensaries that registered with the city under a 2007 ordinance to remain in operation. But the specifics of that proposal still need to be written and reviewed – a process that could take months.

See the original report at NBCLosAngeles.com

Councilman Jose Huizar, who championed the pot-shop ban, had said the exemption for the 182 dispensaries would give "false hope" to medical marijuana advocates.

On Wednesday, his spokesman Rick Coca sought to clarify that there's only one ordinance right now: A ban that is slated to go into effect within 40 days.

The new ordinance allows groups of up to three patients and their caregivers to grow their own medical marijuana, and it provides an exemption for hospices, licensed clinics and home-health agencies.

City officials were discussing Wednesday whether to send a notice to the 762 registered pot shops from the Los Angeles Police Department or from the City Attorney's Office.

It's also unclear which shops will be targeted first, in case some refuse to shut down. "Enforcement priorities" will be determined by LAPD, City Attorney's Office spokesman Frank Mateljan said.

Stay informed with the latest headlines; sign up for our newsletter

"We do expect tremendous voluntary cooperation. Nobody likes to be the subject of a criminal prosecution," said Jane Usher with the City Attorney's Office said. "The harder cases, we'll work with LAPD. We'll be complaint driven. We'll only pursue those dispensaries that are disrupting their neighborhoods."

Coca said he expects broad compliance with the ban, even if there are some resisters.

"If there's 300 extra stores, that's about 600 less than we have now," Coca said.

David McNew / Getty Images file A budtender pours marijuana from a jar at the Perennial Holistic Wellness Center medical marijuana dispensary on Wednesday in Los Angeles. The center opened in 2006.

City officials have estimated there are at least 850 pot stores within Los Angeles' nearly 470 square miles, some of them operating without proper permits and approvals.

Medical marijuana advocates, who packed council chambers and shouted out after the vote Tuesday, said they were prepared to continue fighting the ban.

Americans for Safe Access, a national advocacy group, issued a statement announcing a planned ballot-box campaign to overturn the council vote.

"This is an outrage that the City Council would think a reasonable solution to the distribution of medical marijuana would be to simply outlaw it altogether," said Don Duncan, California director of the group, in a statement.

Watch the most-viewed videos on NBCNews.com

"The tens of thousands of patients harmed by this vote will not take it sitting down," Duncan said. "We will campaign forcefully to overturn this poor decision by the council."

Duncan could not be reached by NBC4 for comment Wednesday, but a spokesman for the organization told KPCC that a planned referendum campaign would seek voter approval for a delay of the ban. KPCC reported the group would need to gather more than 27,000 valid voter signatures to qualify the referendum for the ballot.

If enough valid signatures are gathered, that in itself could delay enforcement of the ban until voters weigh in, according the City Attorney's Office.

Americans for Safe Access supported the measure from Councilman Paul Koretz that would allow 182 registered stores to operate.

An attorney who represents dispensary owners and members said some of them want to sue over the ban.

City council officials in Los Angeles says medical marijuana dispensaries are "out of control" and have approved a ban. KNBC's Kim Baldonado reports.

Lawyer Marina Turovsky said the ban could push clients and dispensary businesses into neighboring cities that will still allow them, such as West Hollywood, which has four pot shops.

The expansion of a small number of remaining shops could draw a crackdown from the federal government, which has in recent months raided large marijuana dispensaries in the Bay Area, Turovsky said.

"If only a few are allowed anywhere, they will expand, they will get bigger, and they will get on this radar. There is not much we can do about it other than try to fight this ban," Turovsky said.

More content from NBCNews.com:

Follow US News from NBCNews.com on Twitter and Facebook