The 13-1 vote drew an angry, profanity-laced response from some medical marijuana advocates who attended the council meeting.
If approved by Mayor Antonio Villaraigosa, the storefront ban would go into effect after 30 days. The mayor's office did not immediately respond to an email seeking comment on the council vote.
In the interim, letters will be sent to as many as 900 dispensaries advising them of the ban.
The city has fumbled with its medical marijuana laws for years, trying to provide safe and affordable access to the drug for legitimate patients while addressing worries by neighborhood groups that streets were being overrun by dispensaries and pot users.
"Relief is on the way," said Councilman Jose Huizar, who introduced the so-called "gentle ban."
Many cities have struggled with medical marijuana ordinances, but none has had a bigger problem than Los Angeles, where pot shops have proliferated. At one point, the city ordered closure of the shops - a process that failed amid lawsuits and conflicting rulings by appellate courts.
This time around the city has a stronger case if faced with lawsuits by pot shop owners, city officials said. A recent appellate court ruling seems to support the new ordinance that refers to a marijuana collective as three or fewer people.
The ban also allows hospices and home health agencies to provide medical pot.
"A judge could file an injunction but we think that is unlikely," said Jane Usher, a special assistant city attorney.
The ban comes during a confusing time for Californians - despite voter approval in 1996 for medicinal use of marijuana with a doctor's recommendation. The state Supreme Court has decided to clarify marijuana's hazy legal status by addressing whether local governments can ban medical marijuana clinics. But a hearing has yet to be set by the high court.
Meanwhile, U.S. authorities have cracked down on pot clinics around the state, saying such operations remain illegal under federal law.
Los Angeles passed an ordinance two years ago that was supposed to shutter hundreds of pot dispensaries while capping the number in operation at 70. But a set of legal challenges against the city by collectives and last month's expiration of the ordinance thanks to a sundowner clause led to another surge of pot shops. City officials said 762 collectives have registered with the city and as many as 200 more could exist.
"We need to start with a clean slate," Councilman Mitchell Englander said before the vote. "Los Angeles has experimented with marijuana and has failed."
However, the ban could be temporary for some dispensaries. A motion made by Councilman Paul Koretz called for city staff to draft an ordinance that would allow for about 180 pot shops to be reopened that were in business before a moratorium was enacted several years ago. That motion isn't expected to be considered for several months.
After the vote Tuesday, some medical marijuana advocates shouted expletives, while others questioned where they could get the drug in the future.
"You don't care about people!" yelled one person.
At least 178 California cities from Calistoga to Camarillo and 20 counties already have banned retail pot shops, according to the medical marijuana advocacy group Americans for Safe Access. Reflecting the murky language of the state's medical marijuana laws, a handful of dispensaries have successfully challenged such local prohibitions in court along with laws that merely sought to regulate dispensaries.
Most recently, an appeals court in Southern California struck down Los Angeles County's two-year-old ban on dispensaries, ruling that state law allows cooperatives and collectives to grow, store and distribute pot. But in a separate case, an appeals court said federal law preempts local municipalities from allowing pot clinics.
The hearing came a day after a priest, drug counselors and others decried crime and other social problems they say surround neighborhood marijuana dispensaries. Among those who spoke at that gathering was a woman who complained about having to push her baby's stroller through clouds of marijuana smoke near dispensaries in her East Hollywood neighborhood.
Daniel Sosa, a medical marijuana advocate, told council members during the hearing it's fruitless to approve a ban that won't have any merit and will likely lead to more lawsuits.
"If you can't enforce it, why are you going to pass something?" Sosa asked the council.
AP Writer Lisa Leff in San Francisco contributed to the report