Jefferson McCarley, a forty-two-year-old San Francisco resident, used to work at Gap’s headquarters, coördinating the logistics of moving merchandise to the shelves of Gap and Old Navy stores. Like the city itself, he has a knack for reinvention. He told me that when Gap laid him off during the recession, he became the general manager of a sleek independent bike shop in the city’s Mission District. Soon, he was voted vice-president of the local merchants association, and joined a group of mom-and-pop-business owners called Keep Valencia Local, which works to stop chain stores from opening locations on the street of that name. Back in 2009, merchants on Valencia Street had helped to kill American Apparel’s bid to move in.

“We appreciate you can go a mile on Valencia Street and not see one formula-retail store,” McCarley told me. The neighborhood, he said, is a “wildlife sanctuary” for independent boutiques, bars, and restaurants.

When McCarley and his friends heard about the impending arrival of Jack Spade—the brother company of Kate Spade New York, both owned by the New York clothing corporation formerly known as Liz Claiborne—they were apoplectic. The company, which sells gingham shirts for a hundred and sixty-five dollars and shoulder bags for three hundred and ninety-five dollars, would take over a space where a used-book store could no longer make rent. “I totally feel there’s a time and place for formula retail,” McCarley said. But he and his allies believed that place was nowhere near them. (“We fell in love with the façades of the building, the kind of food that’s going on there, and the gentrification that is happening in the neighborhood,” said Melissa Xides, Jack Spade’s New York-based vice-president of global sales and retail, at a hearing about the store in August.)

After Keep Valencia Local learned about Jack Spade’s plan, it responded with anti-Spade posters and petitions, and held a “Jack Off” fund-raiser at a local bar. The C.E.O. of the New York corporation, now called Fifth & Pacific, got wind of the group’s activities, and e-mailed McCarley directly. The gist: while McCarley may not want Jack Spade**,** potential customers in the area do.

The C.E.O., Bill McComb, might have a point: The Mission, once home primarily to Latinos, artists, and hipsters, is now the neighborhood of choice for well-heeled Facebook and Twitter employees. The Jack Spade debate highlights San Francisco’s tense tug-of-war over wealth as the city undergoes a disorienting pro-business boom under Mayor Ed Lee. Construction cranes are part of the skyline, and tax breaks have lured scores of tech companies into the surrounding buildings.

Yet, as chains have tried to cash in, City Hall is revealing what’s left of its old, protectionist soul. The rest of the country may have turned into a landscape of Home Depots, Taco Bells, and Ramada Inns, but, since 2004, San Francisco has rejected chain stores through a series of laws and a ballot initiative. Today, it’s the largest city in the country to ban chains in some zones and require special permits in others.

“Our claim to fame, in San Francisco, has always been our unique neighborhoods,” said Kathleen Dooley, who serves on the city’s small-business commission, and has been a part of discussions on pending legislation. “There’s a very valid worry that it could become very homogenous, as we’ve seen in Manhattan.”

The current system is far from an outright ban: in fact, since 2004, the municipal planning commission has approved permits for seventy-five per cent of proposed chain locations. You can easily find Big Macs, Starbucks lattes, and Apple Macbooks (one chain San Francisco residents can really get behind) within city limits. Target opened a scaled-down store downtown last year, which the mayor championed, and a second location is set to open this fall. Still, the planning commission has barred a Sherwin-Williams, the Bay Area chain Pet Food Express (twice), and a CVS pharmacy. City planners quashed Chipotle’s recent bid to open in the Castro neighborhood, and this summer, city supervisors passed a law requiring, for eighteen months, that chains obtain permits to open stores in the formerly blighted downtown stretch where Twitter headquarters relocated, a zone known for vacancies, drug deals, and fast food. The supervisors have also introduced tougher chain-store legislation, such as extending controls to even more neighborhoods.

The city defines chains as businesses with at least eleven stores nationwide and certain standardized aesthetics and merchandise. Jack Spade has ten U.S. locations; San Francisco would be the eleventh. That puts it one store short of requiring a conditional-use permit—which would have meant notifying the public of its plans, getting through a public hearing, and persuading planning commissioners of the proposed store’s benefits.

One selling point of chain stores, in a city that’s losing its middle class, is that they can keep prices down. The neighborhood that first enacted a ban on chains, in 2004, Hayes Valley, has become so upscale that its own supervisor, London Breed, says she doesn’t shop there. People who live in the subsidized housing where she grew up, blocks away, “don’t step foot” in the expensive neighborhood stores “because they don’t feel comfortable there,” she told me.

Cindy Wu, the planning commission’s vice-president, echoed that sentiment in a discussion of legislation proposed by Breed that would redefine chains as businesses that have eleven stores worldwide—not only nationwide—or as stores that are at least half-owned by chains. “The move toward this exclusive, boutique neighborhood is one that doesn’t serve all San Franciscans, and I have some concerns there,” Wu said. (Breed said that despite the ban, she’s willing to allow a chain grocery store into the area to make it more affordable for residents.)

Locally owned stores argue that they may be expensive, but claim that’s partly because, unlike chains, they can’t spread overhead costs across multiple locations. Independent stores can’t pay the rent and start-up costs that chains can; they fear that the arrival of chains would drive up their own rent.

Which is where McCarley and his merchant colleagues come in. In late August, they spoke out against the Jack Spade store at a Board of Appeals hearing, arguing that it was merely the men’s line of Kate Spade New York, which has dozens of stores, and thus requires a conditional-use permit. They fell one vote short of getting Jack Spade’s building permits revoked. They haven’t given up; McCarley and his cohorts have won a rehearing, scheduled for October 9th.

Jack Spade will fight once more to move in. “While there’s a handful of people opposed to us, I don’t think they’re indicative of the support we’re receiving,” Xides said. “There are a lot of businesses that want us to go into the space.”

I asked McCarley whether Jack Spade customers might be the same people who would buy at his shop, where the design-it-yourself bicycles run from seven hundred and ninety-nine dollars to two thousand dollars; he said that they probably are. “This business would probably do better if Jack Spade opened up,” he said. “This is not about, is this good for my business? It’s about, is it good for the neighborhood?”

He went on, “That’s more important to us than foot traffic, or even profitability.”

McCarley said he’s surprised Jack Spade isn’t giving up, given all the opposition. “I thought they’d see that and say, ‘So sorry, we’ll find another neighborhood.’ What self-respecting person wouldn’t come to that conclusion?” Apparently, the sort who sees all the money riding down Valencia on designer bicycles.

Photograph by Ed Darack/Science Faction/Corbis.