The San Francisco supervisors on Tuesday quashed former Oakland Mayor Jean Quan’s plans to open a high-end cannabis dispensary in San Francisco’s Outer Sunset District.

The board’s 9-2 vote to withdraw the permit for the Apothecarium cannabis club was the dramatic finale to a raucous appeal hearing, at which dozens of mostly older Chinese residents of the Sunset joined the conservative Pacific Justice Institute to block the dispensary from opening on Noriega Street.

“In the eyes of federal law, the Apothecarium is no different from a street-level crack dealer,” said Ray Hacke, a lawyer for the Pacfic Justice Institute, which filed the appeal. The Sacramento group argued that the 2505 Noriega St. location is inappropriate for a dispensary, because it is near a church and a preschool.

The board sided with the irate Sunset residents and went against the Planning Commission, which approved the pot club by a 5-1 vote in July. The dispensary has three other stores, in the Castro, the Marina and Las Vegas.

Supervisors Jeff Sheehy and Malia Cohen dissented.

“The Apothecarium has demonstrated itself to be a high-quality establishment,” said Andrew Perry, the Planning Department staffer responsible for the project.

He noted that the dispensary’s proximity to the church and preschool wasn’t a reason to deny it a permit. San Francisco law prevents cannabis clubs from opening within 1,000 feet of a school or facility that serves children younger than 18, but preschools are not included.

Planning staff also pointed out that the Sunset isn’t bearing its share of San Francisco’s cannabis industry, which is largely concentrated in neighborhoods like SoMa and the Outer Mission.

“The commission supports a more equitable distribution of medical cannabis dispensaries citywide,” said AnMarie Rodgers, a senior policy adviser at the Planning Department.

Opponents who packed the board chambers were embattled. Many of them wore pink “No MCD” — medical cannabis dispensary — lapel badges. Some equated marijuana use with the opioid epidemic. Others called the club a form of gentrification. Still others said it would lure young children in the Sunset into a life of drugs and crime.

But the dispensary also drew a large number of supporters, many of whom donned contrasting green lapel badges with the slogan “Safe Access for Patients.” Some identified themselves as cannabis users coping with pain from long-term illnesses. One woman said her daughter had sold Girl Scout cookies in front of another Apothecarium store and felt completely safe. They ultimately failed to persuade the supervisors.

The hours-long debate culminated with an impassioned speech by Katy Tang, who represents the Sunset District. She expressed sympathy for the residents who opposed the dispensary and the patients who supported it — and told the Pacific Justice Institute to stop exploiting people’s fears about marijuana legalization.

“I know you’ve latched onto many of the battles that have happened in the city, and particularly in the Sunset,” Tang said. “Please stay out of it.”

The hearing capped a meeting at which the board also approved legislation to crack down on bicycle chop shops, despite staunch opposition from Supervisor Hillary Ronen.

Sheehy sponsored the chop-shop ordinance, which would allow the city’s Public Works Department to confiscate stockpiles of five or more bikes, three bikes with missing parts, a single bike frame with its brake cables and gear cut, or five or more scattered bike parts. It passed 9-2, with Ronen and Supervisor Sandra Lee Fewer dissenting.

Sheehy said he wanted to prevent bicycle carcasses from cluttering public rights-of-way.

“I hear from my constituents that they can’t get from one place to another because there are these bicycles piled up,” Sheehy said. He revised the ordinance Tuesday to deflect criticism from homeless advocates, taking out an impound fee they said was an unfair burden. The new version allows people to reclaim their bikes for free after 30 days.

But Ronen said the ordinance does nothing to address the actual problem, which is bike theft — not homeless people fixing bikes and selling them.

“The only added tool this legislation provides is that it allows Public Works to take bike parts,” Ronen said. She pointed out that anyone whose bike parts are seized can retrieve them after 30 days, without showing proof of ownership. She argued, further, that the ordinance would strain the Public Works Department, which is already struggling to clear homeless encampments and other sidewalk debris.

Those arguments failed to persuade Supervisor Malia Cohen, whose Bayview district abuts the Portola and Mission neighborhoods that Ronen represents. Though the two supervisors face many of the same quality-of-life issues with homeless encampments and theft, they often butt heads on policy.

Cohen, who supported the chop-shop ordinance, flashed at Ronen.

“What’s wrong with (creating) another tool to address the problem?” she asked.