SAN FRANCISCO — The San Francisco Board of Supervisors on Tuesday rejected a plan submitted by the husband of former Oakland Mayor Jean Quan to open a medical marijuana dispensary in the Sunset District.

The board’s 9-2 vote upheld an appeal of the project led by an alleged anti-LGBT group and supported by dozens of Chinese residents who argued that the dispensary was too close to a church and a preschool. The site is a former pharmacy.

Dr. Floyd Huen, who is married to Quan, sought a permit to open the Sunset District’s first dispensary and the region’s first bilingual (Cantonese/English) medical pot store at Noriega Street and 32nd Avenue.

Huen’s partner, Apothecarium, already operates a dispensary in the Castro, but some 3,500 patients live in the Sunset, according to Huen. The prominent Oakland couple, Huen and Quan, faced opposition from the start.

On Tuesday, scores of residents from the predominantly Chinese neighborhood told the board the dispensary would present a danger to children and youth. The effort was led by the Pacific Justice Institute, which the Southern Poverty Law Center has identified as an anti-LGBT organization. PJI has called the label “baseless and reckless” and says it is a religious liberties defense group.

While the majority of supervisors denounced PJI, they ultimately sided with concerned residents after an emotional hearing. Only Malia Cohen and Jeff Sheehy voted in favor of the dispensary.

There are no immediate plans for Apothecarium to submit another dispensary application.

“The Pacific Justice Institute won, and Sunset patients lost,” Eliot Dobris, head of community outreach for Apothecarium, said Wednesday morning.