On the surface, it’s a feel-good urban planning story.

This month the Berkeley City Council agreed — unanimously — to work with BART on housing developments at its North Berkeley and Ashby stations. They set aside at least 35% of the units for low-income families. A former hippie haven, now known for its ample parking and million-dollar craftsman bungalows, had suddenly taken bold steps to address the housing crisis.

But the reality is more tense. When Assemblyman David Chiu sponsored legislation last year to quilt BART parking lots with housing, Berkeley split into factions over the idea. Residents crammed public meetings, where two sides brandished colored signs: blue for the pro-housing coalition; green for the residents with concerns about height and the cost of building new infrastructure. A third group raised fears that motorists who use the parking lots would be displaced by new homes.

“At the City Council meeting in May, the ‘I-have-concerns’ group totally outnumbered us,” said Libby Lee-Egan, a volunteer organizer for the pro-housing group. “They were in this big clump with their green signs.”

It seemed like every nuance in the conversation had its own activist bloc. So, many residents were surprised by the City Council’s 9-0 vote to approve terms for a memorandum of understanding with BART. The transit agency is expected to sign it next year, and Mayor Jesse Arreguín hopes to solicit a developer in 2022.

The document has deeper meaning: it insulates these projects from the reactionary politics of Berkeley, making it harder for people to scuttle them in the future. Eventually, the city could build as many as 1,700 new homes across the two stations.

This commitment marks a turning point for the city, which is famous for ship-wrecking any development that offends the character of its neighborhoods. It’s also a critical moment for Arreguín, who entered politics as a fierce protector of local control, but who evolved in recent years to be more of a regional mayor. He now serves as president of the Association of Bay Area Governments, where he may push for a regional housing bond next year.

“All of these things — the housing affordability crisis, the people living in tents on our streets and the impact of people driving because they have to move far away — have required me, and required all of us, to act differently,” Arreguín said.

Transit-oriented development could also be redemption for BART. Fifty years ago, the Bay Area rail agency razed homes and decimated neighborhoods to build parking lots for its passengers. That form of land use ultimately became a liability. Now, BART needs to pack homes around its stations to boost ridership, especially during off-peak hours and weekends.

With the passage of Assembly Bill 2923 — the BART housing bill — transit officials saw an opportunity to turn the agency’s expansive lots into metropolitan villages. Though the law met resistance from some East Bay mayors and residents who viewed it as blunt-force urbanism from Sacramento, others saw an opportunity.

“The belief now is that this is the right way to grow — in the inner Bay Area, close to transit,” said Berkeley City Councilwoman Rashi Kesarwani, a steadfast supporter of development at the North Berkeley Station, which is in her district. She described the project as “a twofer”: it makes Berkeley a more inclusive city by providing homes for low-income residents with a design that helps wean people off automobiles.

Berkeley tried to get ahead of the process two years ago, when Arreguín and Kesarwani’s predecessor, Linda Maio, went door-to-door in North Berkeley to warn residents that the state bill was moving forward.

At that time “most people were suspicious, or not really on board, or were confused,” said housing activist Darrell Owens, who grew up four blocks south of the station.

Owens and other like-minded neighbors began to mobilize. They met in living rooms after work, showed up to speak at City Council meetings and posted lawn signs with the slogan “Let’s build paradise instead of a parking lot.”

In the meantime, Maio and Arreguín hosted workshops and residents submitted alternative designs for the stations. Ideas ranged from quaint to extravagant. One artist, Alfred Twu, drew the “Hanging Gardens of North Berkeley,” a pagoda-style building with 1,075 homes, surrounded by food trucks, market stalls and a theater.

Though it excites many people, the idea of trading parking spaces for housing has plenty of opposition.

In a letter to the mayor last year, resident Mary-Louise Hansen called the North Berkeley plan “an empty gesture of good intent that shows blatant disregard for the tax-paying homeowners,” many of whom have no reliable way to get to BART without a car. Hansen lives in the hills, where buses run infrequently, biking is difficult and the streets are less pedestrian-friendly.

Others worried the buildings would be too tall, casting shadows or blotting out the skyline. BART has classified North Berkeley as an urban neighborhood city center, because of its walkable streets and connections to jobs. That designation got codified in the state law, which means the city is not allowed to set building height limits below seven stories on the BART lot.

Still others worried the city would invite a developer to build luxury apartments with only a small portion reserved for low-income tenants. Many called for the station developments to be 100% affordable, a goal Arreguín supports, though it presents funding challenges for the city.

In South Berkeley, residents agonized over the fate of the longstanding Ashby Flea Market, which takes place in the parking lot every weekend. City Councilman Ben Bartlett, who represents the district, has promised to find the market a home in “whatever beautiful 21st century transit village gets built there.”

Bartlett co-sponsored the BART housing legislation with Kesarwani and Arreguín, and all three have pledged to incorporate community feedback into the design.

Fights over aesthetics and parking may simmer for years, but more people have become resigned to the idea of housing.

“Berkeley is turning a corner,” said Abby Thorne-Lyman, BART’s manager of transit-oriented development. She recalled how previous discussions about building housing at Ashby Station went nowhere in the early 2000s.

Now Berkeley has become a test case for BART, to figure out if officials can stick to their environmental and housing goals, while delivering a design that’s sensitive to the community. BART is considering solutions for lost parking, Thorne-Lyman said. Among them: electric-assist bikes or scooters, better management of parking on nearby streets or use of a new garage that opened downtown.

Arreguín is eager to meet the challenge. He and his deputy chief of staff, Lars Skjerping, stood on the west steps of North Berkeley Station on Tuesday morning. They faced the station concourse, a Jell-O mold of concrete surrounded by bike racks and tiled walkways. Around it, a vast parking lot spread for eight and a half acres — an urban center waiting to be filled.

Editor’s note: The story has been updated. Berkeley Mayor Jesse Arreguín is not a member of the Metropolitan Transportation Commission.

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