California is in the throes of a crippling housing shortage that has driven up the cost of living, exacerbated the homelessness crisis, and forced many hundreds of thousands of families to either leave the state.

In response, state policymakers have spent the past few years beefing up state housing law to make sure that every municipality allows its fair share of housing. The idea is simple: every eight years, municipalities should take stock of regional housing needs, identify unnecessary regulatory barriers standing in the way of new development, and make a plan to allow at least some additional housing to be built. If every city allows at least a little housing to be built, the thinking goes, the Golden State could get itself back on a path to affordability.

Most California municipalities, including many in Orange County, have met their obligations, adopting local plans that will make it easier for developers to build housing at all income levels. Many municipalities, like Santa Monica, have begrudgingly compiled after much squirming. Some have negligently fallen out of compliance. But only one municipality has openly committed to breaking the law: Huntington Beach.

On March 7, the Hunting Beach City Council moved to formally ignore state housing law in a 4-3 vote, following multiple warnings from Attorney General Rob Bonta and the California Department of Housing and Community Development that doing so would put the city at significant legal risk. The vote follows on the heels of City Attorney Michael Gates announcing a lawsuit against state housing law—a quixotic endeavor that was rejected by the last city council.

But Huntington Beach’s new NIMBY regime isn’t content to stop there. In late February, the council aimlessly instructed Gates to take “any legal action necessary” fighting a slew of recent bills that have removed barriers to housing production across California. Targets include SB 9, which legalized duplexes statewide, as well as SB 10, which granted local governments relief from the state’s onerous environmental review mandates. A representative of the Attorney General’s office didn’t mince words on the proposed lawsuit: “[it] not only misguided, it is unlawful.”

Also in their sights are accessory dwelling units (ADUs), those humble apartments that often share a lot with a single-family home. Since 2016, state law has protected the right of California homeowners to fashion ADUs out of unused basements, attics, and garages, often to house aging parents or young adult children. Last year, ADUs made up over a third of the new homes built in Huntington Beach. But in the same resolution declaring war on pro-housing state legislation, the council illegally directed local planners to stop issuing ADU permits.

State housing law is clear—it’s not a matter of if the Huntington Beach NIMBY putsch will fail, but when. While out of compliance, Huntington Beach is ineligible for millions of dollars in state funds, and at risk of innumerable lawsuits from housing rights organizations and developers. A lawsuit by the Attorney General’s office now seems inevitable, and when the city loses, it could lose its power to regulate new development and be liable for fines of up to $100,000 per month of non-compliance. Many local planning powers could soon fall into court receivership.

And for what? All Huntington Beach had to do was come up with a plan to allow a two percent annual increase in the housing stock over the next eight years—a typical growth rate in affordable cities. The city could easily have achieved this by allowing an offensive mix of ADUs and fourplexes, along with the occasional five-over-one apartment building in place of dying strip malls. Instead, Huntington Beach could soon be legally obliged to allow anything and everything a developer proposes.

The city seems intent on its present course. But with any luck, Huntington Beach’s temper tantrum is the dying whimper of the broken system that has made California so hostile to working- and middle-class families.

M. Nolan Gray is the research director for California YIMBY and the author of “Arbitrary Lines: How Zoning Broke the American City and How to Fix It.”