An army of build-it city dwellers, funded by the CEO of Yelp, is heading to court to force a sleepy East Bay suburb to go dense.

The San Francisco Bay Area Renters’ Federation — which goes by the name SFBarf — is suing the city of Lafayette, demanding that it resurrect a scrapped plan to build high-density housing on a 22-acre knoll of Deer Hill Road, just north of Highway 24. It’s the first legal challenge in what SFBarf has promised will be a “Sue the Suburbs” campaign to push places like Lafayette to help the Bay Area build its way out of the shortage of housing.

The case is making a central Contra Costa County town known for good schools and cow-dotted hillsides a battlefront in a regional housing war.

“Why Lafayette? It’s on BART, it’s right next to Walnut Creek, and yes, people want to live there,” said SFBarf’s 34-year-old founder, Sonja Trauss, a full-time activist with a master’s degree in economics who lives in West Oakland.

“It’s a nice place,” said SFBarf’s lawyer, Ryan Patterson.

Now Trauss is trying to force Lafayette to do what she sees as its fair share. Her organization sued the city in September after hearing that a developer had tabled plans to build 315 moderate-income apartments on a stretch of open space, instead opting for 44 single-family homes with a dog park, sports field and parking lot.

City Manager Steven Falk deemed that plan a fair alternative after residents criticized the original proposal in 2013, saying it would desecrate the landscape and clog the city’s roads. The revised “Homes at Deer Hill” plan got a warm reception in City Hall, and the City Council unanimously approved it in August.

SFBarf filed a revised lawsuit in March, saying that officials had violated the state’s Housing Accountability Act, which bars cities from rejecting development for arbitrary reasons — in this case, because a vocal faction of Lafayette residents wanted to preserve the city’s “semirural” character.

Trauss said city officials had strong-armed the developer, O’Brien Homes, into redesigning the project at a lower density.

Seeking to make a statement

The suit seeks to invalidate the 44-home plan and force the city to issue permits for the original 315-apartment development, regardless of whether O’Brien Homes still wants to build it, Patterson said. A spokesman for the company declined to comment until the SFBarf lawsuit and a competing one are resolved.

Mostly, SFBarf’s idea is to make a statement.

“The goal here is to discourage municipalities in the future from breaking the law just because they think the public won’t stand up and push back,” Patterson said.

“It’s such a dramatic story, but it’s an example of what cities try to do a lot,” Trauss said. To her, Lafayette had become an allegory for all cities that resist new construction and housing growth.

“The name (Lafayette) makes the place sound fancy and exclusive — which it is,” she said.

According to 2010 U.S. census data, Lafayette is 81 percent white, and data from the real estate tracking site Zillow show the median home price is almost $1.4 million. Still, the city’s population is on an upswing, increasing from 23,794 in 2010 to 25,473 in 2014.

Some Lafayette homeowners say they’ve witnessed plenty of new development over the last few years, to the point that cars are clotting the city’s main arteries.

“It’s awful, it’s dangerous,” said Michael Griffiths, a 67-year-old software salesman who has lived in Lafayette since 1989. “The biggest shopping mall, where they have Safeway and Whole Foods, is a disaster.”

Like Trauss, Griffiths opposes the plan to build 44 homes at Deer Hill — albeit for the opposite reason. Where she sees a dearth of development, he sees an overload.

“You take 22 acres of prime land that faces Mount Diablo,” he said. “And then you want to add 44 homes, and 10 acres of sports fields, and a parking lot that holds 70 or 80 cars for those who want to visit the sports fields.”

Griffiths sees SFBarf’s lawsuit as little more than a stunt by outsiders with no stake in the town’s future.

SFBarf is, indeed, a new kind of political animal. Over the past year, its 50 volunteers — most of them young renters, like Trauss — have popped up at city council meetings throughout the Bay Area, pressing officials to build everything from low-income apartments to high-end condos.

Funding from Yelp CEO

In December, SFBarf ran its own slate of candidates for the San Francisco chapter of the Sierra Club — a brazen and ultimately unsuccessful attempt to change the chapter’s opposition to high-rise projects.

Reviled by many homeowners and old-school preservationists, SFBarf has won support from 38-year-old Yelp CEO Jeremy Stoppelman, who has become its main benefactor. He says the Bay Area’s housing shortage has “choked off the growth potential” for companies in San Francisco, which can’t attract new employees if there aren’t enough reasonably priced places to live.

“It’s very basic,” Stoppelman said. “It’s not about luxury versus non-luxury. It’s just about the units. We have to focus on the numbers.”

This year, Stoppelman donated $100,000 to SFBarf, much of which has helped fund the lawsuit against Lafayette.

It was such housing battles that prompted state legislators to pass the Housing Accountability Act — also dubbed the “anti-nimby law” — in 1982, said Patterson, the SFBarf lawyer.

“There’s a perhaps natural tendency to want to keep things as they are,” he said. “So cities were squishing or downsizing projects that they didn’t want to see, because they didn’t want change.”

But the law is seldom enforced, and as a result, cities usually have the upper hand when they ask a developer to scale back and build something smaller, the attorney said.

“Developers have this terrible choice between fighting to have the city approve something it doesn’t want, or cutting a deal and agreeing to build the project at a lower density,” Patterson said.

In the case of the Lafayette development, it was easier for the builder to compromise and downsize than duke it out with the city, he said.

“I think SFBarf saw an injustice taking place, with no one else to make it right,” Patterson said.

Griffiths and other residents see it differently.

“They showed up within four weeks of this (project) being approved,” Griffiths said. “They’re a bunch of not-very-well-informed people who are funded by a software executive.”

Infuriated, Griffiths corralled several like-minded residents to form the group Save Lafayette. On March 17, they filed their own lawsuit against the city, demanding a ballot referendum that would allow voters to rescind the zoning plan for Deer Hill.

If passed, the measure would “make it considerably more complicated for the development to happen,” said Griffiths’ lawyer, Stuart Flashman.

Downtown development

Lafayette officials wouldn’t comment on the odd-couple lawsuits, though City Manager Falk defended the strategy of concentrating development downtown, near the BART station, about 2 miles away from the proposed Homes at Deer Hill.

The city has about 500 units either recently completed or in the construction pipeline, Falk said. Most of them are downtown, intended for commuters and renters.

“This is one of the ironies of the lawsuit brought by SFBarf,” Falk said. “Succinctly stated: They’re suing the wrong suburb.”

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

Twitter: @rachelswan