With a sun-drenched boardwalk just a short ferry ride across the bay from San Francisco, the former shipyard community of Vallejo ought to be buzzing. But it isn't - the city has officially gone bust.

Pushed over a financial precipice by wider economic woes, Vallejo's city authority has declared itself bankrupt. Its demise has triggered anger in a place that was once, for a fleeting few months in the 1850s, the capital of California.

Funding for police, firefighters, senior citizens, road maintenance, libraries and parks is up in the air until a bankruptcy judge has scoured the books. The city of 117,000 people is $17m (£8.7m) short of what it needs to pay the bills.

"Bankruptcy isn't your first choice. Or your second or third, really. It's your last choice," says Stephanie Gomes, a local council member. "But for us, the system is so broke it's actually a huge opportunity to get in, clean out all the good ol' boy politics and fix the problems."

A stone's throw from the Napa Valley wine district, Vallejo was known for its warships - the nearby Mare Island naval shipyard produced 500 vessels including several nuclear submarines before it shut in 1996. Since then Vallejo has prospered from a housing boom fuelled by commuters seeking affordable homes within reach of San Francisco.

For years, taxes and fees rolled in as developers speckled the city's scorched hills with immaculate estates. The sub-prime mortgage crisis in the United States was a jolt. Homes in many estates lie empty because their owners could not afford loan repayments and, with lots of vacant homes, construction has halted. "There aren't many housing starts so we aren't getting the fees," says council spokeswoman JoAnn West.

Extreme

A Californian law, Proposition 13, constrains cities from raising tax rates on existing properties. With prices in some areas falling 50%, savvy residents have had their homes revalued and are paying much lower rates.

John Quigley, a professor of economics at the University of California, says: "Vallejo may be extreme but other cities exhibit the same symptoms." In some parts of the state, he says, property prices doubled over 15 months in 2003 and 2004. The extent of the boom has made the downturn more dramatic.

"I don't see any evidence that we've hit the bottom in California," he says. "You're talking several years of decline."

The state of Vallejo's finances has prompted questions. Why, for example, is it paying six-figure salaries to many police officers and firefighters? Marc Garman, a community activist and blogger, says powerful unions representing the emergency services won generous deals from politicians that are unaffordable in tough times, adding: "They left reality in the dust."

Some say the 2001 attacks on the World Trade Centre led to pay inflation in the emergency services as local authorities found it hard to say no to workers held in high public esteem. "Kids grow up wanting to be firemen," says Gomes. "It's a hero's job and 9/11 put that on a whole new level. If you criticise police or firefighters, you're anti-hero."

According to the police union, though, Vallejo's bankruptcy is a ploy to diddle its members out of money. Only with permission from a bankruptcy judge can Vallejo break its pay contracts. Mat Mustard, vice-chairman of the Vallejo Police Officers' Association, says his members have made $10.6m in salary concessions over six years. "This bankruptcy has nothing to do with financing. This bankruptcy has to do with breaking union contracts and obligations the city has to its employees."

Vallejo is not the first US municipal authority to declare bankruptcy, but is the biggest to do so as a result of a deficit in tax revenue. Orange County sought protection from creditors in 1994 after making bad investments and New York came close when President Ford refused to bail it out in 1975, the Daily News proclaiming: "Ford to city: drop dead."

On Vallejo's main drag, Georgia Street, is a motley selection of antiques stores and discount retailers. Along the waterfront, the city shows a more prosperous face as commuters park their cars and dash for a boat across the bay.

Taking a morning walk, retired management professor Carlyle Johnson says bankruptcy is dismal news for those reliant on local services. "The federal government can print money but local governments can't. There's no way for them to come up with any more money."

Case study

Manicured lawns and ornamental stone cladding are the norm in Hyde Park, a gated community in the hilly suburbs of Vallejo. But the estate is peppered with for sale signs, many of which bear two giveaway words - "bank owned".

At the peak of the market two years ago, a typical Hyde Park home of four or five bedrooms went for $1m and the estate was sold out. Buyers can pick up a house now for as little as $400,000 (£205,600).

"The banks are competing with themselves to drop prices," says Ron Lee, a broker at a north Californian estate agency. And lenders have become more circumspect. "At least you have to prove your income now," Lee says. "They're not just taking your word for it."