From day one, they seemed like interlopers. Two cannabis dispensaries, wedged together on the same block in San Francisco’s Excelsior neighborhood — a neighborhood freckled with produce shops and hole-in-the-wall churches, and filled with merchants who hadn’t asked to be part of a “green zone.”

It didn’t take long for the complaints to pile up. A baker said cannabis patients were smoking in his doorway and chasing away customers. A beauty shop owner said the pungent smell of marijuana was seeping through her walls. The owner of a chicken restaurant knocked persistently on the clubs’ doors, trying to tell the operators that their customers had all but commandeered her small parking lot at Mission and Niagara streets.

With the sale of recreational marijuana becoming legal next year in California, this type of turf war could soon be replicated all over the city.

“You have businesses that have been there for 20 or 30 years, and then you have these new (dispensaries) coming in with a real transient, in-and-out clientele,” said Supervisor Ahsha Safai, who represents the Excelsior. He’s complained at Board of Supervisors meetings that the pot clubs on Mission Street aren’t “cigar-lounge beautiful” and that one has bars on its doors and armed security guards standing outside.

Over the summer, Safai stepped in to mediate the conflict between merchants on the 5200 block of Mission Street and the two dispensaries, Mission Organic and Cookies SF.

So far, it hasn’t been easy.

“The cannabis patients — they don’t respect us,” said Raquel Alvarez, owner of El Pollo Supremo, the chicken restaurant. Her relationship with the two dispensaries grew so bad that Cookies SF now assigns an armed security guard to stand in her parking lot and make sure cannabis patients don’t use it.

But Mission Organic owner Mikhail Mekk said the clubs are being scapegoated.

“It’s easy for her (Alvarez) to blame us,” Mekk said. “But from our perspective, she’s always getting a free security guard.”

Mekk, who opened in 2012, said he’s tried to be a good neighbor. He installed air filtration systems, attended neighborhood meetings and sent his staff to pick up litter at nearby Cayuga Park. His building seems designed to be inoffensive, with its lobby that resembles a doctor’s office and its iridescent green cross in the window.

But those concessions haven’t satisfied Mekk’s neighbors. The conflict escalated in 2013 when another dispensary, TreeMed, moved in — it later changed ownership and became Cookies SF.

“Since (the dispensaries) arrived, my business has dropped by 40 percent,” said Mauricio Varela, manager of the Pan Lido bakery, which is sandwiched between Cookies SF and El Pollo Supremo. He’s among several shop owners who now place “Out of Service” signs on their bathrooms so that cannabis patients can’t use them.

Recently, a separate battle flared up in the Outer Sunset, where neighbors rallied to prevent a high-end dispensary from opening on Noriega Street. Crowds of mostly older Chinese residents packed City Hall hearings throughout the summer, saying the club would bring crime and drug-trafficking to their neighborhood. Some compared marijuana to the opioid epidemic. Others called it a form of gentrification.

The opponents ultimately swayed the Board of Supervisors, which voted to revoke the club’s permit during a dramatic, seven-hour meeting earlier this month. It signaled that cannabis may already be the most divisive land use issue in the city — and that politicians who claim to be pro-marijuana wobble easily under pressure from constituents.

“There will definitely be tension,” said state Sen. Scott Wiener, D-San Francisco, who is also a former supervisor. He noted that even though San Francisco voters overwhelmingly support cannabis, “it’s different when a dispensary wants to locate near where they live.”

For years, San Francisco’s cannabis clubs have clustered on scrappy corridors in SoMa or the outer pockets of the city — mostly because zoning laws prevent the clubs from opening in neighborhoods that are zoned as residential or industrial, or within 1,000 feet of the nearest school. The Excelsior became a particularly desirable spot because it borders San Mateo County, where dispensaries have been prohibited.

But the neighborhood’s culture and topography made conflict almost inevitable.

“You have a commercial area surrounded by a lot of residential side streets,” said San Francisco Police Capt. Joseph McFadden, who runs the Ingleside district station. Since the dispensaries moved in, he’s received numerous complaints about customers double-parking and people smoking marijuana in residents’ driveways and refusing to leave.

“We’re kind of a forgotten neighborhood,” said Sean Ingram, co-owner of the Dark Horse, a craft beer bar that sits kitty-corner to Mission Organics and Cookies SF. Ingram said the Excelsior is already struggling with a number of other problems, such as underground casinos and boarded-up storefronts. He and others say it became a dumping ground for cannabis largely because it’s a working-class, immigrant neighborhood without a lot of political juice.

“I’ve noticed there aren’t any pot clubs in Noe Valley,” he said.

City officials say they will fix the clustering problem when the Board of Supervisors passes new cannabis regulations in the coming weeks, reducing the school buffer from 1,000 to 600 feet and requiring at least 300 feet between dispensaries.

Safai, meanwhile, is trying to play both sides.

In July, he sponsored an ordinance to limit the number of cannabis clubs in his district to the current three — the third, called the Green Cross, sits farther north on Mission Street and appears to have a more amicable relationship with its neighbors.

As the supervisor works to limit the cannabis trade in his district, he is also trying to broker a peace plan between the existing clubs and their neighbors.

He’s urged Mission Organic and Cookies SF to emulate the Green Cross, which has an elaborate system of surveillance cameras that connect to a central control room. Its security guards wear dark suits and ear pieces, and patrol the block in small cars with sirens.

“The Green Cross has a much more professional look,” Safai said, noting that he will ask the other clubs to voluntarily add a network of surveillance cameras and guards with patrol cars.

Mekk bristled at Safai’s request, saying he can’t afford to hire a new security detail.

“I understand what (Safai) wants, but this is all very expensive,” he said. “I’m a small business with taxes to pay and competition next door. Is (Safai) going to make the liquor stores and the produce market hire security?”

Cookies SF, which has the barred doors and the armed security guards, did not return numerous calls for comment. The owners have been on good terms with Alvarez since they began sending guards to patrol the parking lot at El Pollo Supremo.

“Cookies SF is trying to help,” Alvarez said.

Other neighbors just want to get rid of the clubs altogether.

Among them is Varela, the baker. He winces, recalling a petition that circulated a few years ago to prevent the two dispensaries from opening.

Varela regrets that he didn’t sign it.

Rachel Swan is a San Francisco Chronicle staff writer. Email: rswan@sfchronicle.com Twitter: @rachelswan