California lawmakers have failed to pass the most ambitious proposal yet to combat a growing housing crisis in the nation’s most populous state, voting down legislation Wednesday and Thursday that would have overridden local zoning laws to let developers to build small apartment buildings in neighborhoods reserved for single-family homes.

Senate Bill 50 was meant to address an estimated shortage of 3.5 million homes that has driven up rents and contributed to a growing homelessness problem. It was authored by Sen. Scott Wiener, a Democrat from San Francisco, home to some of the highest housing prices in the country.

The bill failed to pass Wednesday by three votes. However, the Senate voted to give it “reconsideration,” meaning lawmakers could vote on it again on Thursday. But that vote failed as well.

Wiener had been working on the measure since last year, saying lawmakers “have a responsibility to take bold action to make people’s lives better by ensuring we have enough housing for everyone who needs it.”

“Restrictive zoning puts a hard cap, full stop, on our ability to build enough housing to get out of this crisis,” Wiener said.

But he was unable to overcome strong opposition from local governments, including the influential League of California Cities, that said the bill would “greatly undermine” their authority to regulate growth.

Supporters, like Democratic Sen. Ben Hueso of San Diego, were motivated by the state’s high cost of living and housing shortage.

“I don’t know how people can afford to live in our state,” Hueso said. “I can’t explain why we don’t have a greater supply of apartments under construction.”

But opponents, like Democratic Sen. Henry Stern from Calabasas, worried the bill would increase building in areas prone to wildfires, which have become bigger and more frequent in recent years because of climate change.

“What we are going to be doing is burning more and more Californians’ homes down the more we build down there,” said Stern, who lost his home in a devastating 2018 wildfire in Southern California.

Wiener had changed the measure to give local governments two years to come up with their own housing plans that could have exempted cities from many of the law’s requirements. But it wasn’t enough for approval in the Senate.

Gov. Gavin Newsom, who supports the bill, said he was not giving up.

“We’re going to get something big done this calendar year, this legislative session,” Newsom told reporters. “We are going to continue to work aggressively to address production in this state.”

Many local governments opposed the measure because developers would have been allowed to build small apartment buildings in areas where local zoning laws don’t allow them, including neighborhoods filled with single-family homes.

Sen. Bob Hertzberg, a Democrat from Van Nuys, said he objected to the premise that cities and counties are “standing in the way of home-building at the behest of single-family homeowners.”

“This sweeping generalization both oversimplifies the problems and undeservedly demeans people who have done nothing more but make homes for themselves, raise a family and play by the rules,” Hertzberg said.

It also would have allowed five-story complexes within a half-mile of rail stations and ferry terminals. Smaller apartment buildings could be built within a quarter-mile of bus stops on a frequent bus line or a census tract that officials say has lots of available jobs.

Its demise highlights the difficulty of passing major housing legislation in California. Many of lawmakers’ most sweeping ideas have failed to pass the Legislature. An exception was a new law that took effect in January that limits rent increases for many properties to 5% a year plus inflation.

© The Associated Press. All rights reserved.