While 50 miles to the north, in Sacramento, a bankruptcy judge and lawyers for Stockton and its 18 creditors have begun to sort out who owes what to whom, Stockton’s 292,000 residents have been left trying to hold together some semblance of order and respect for themselves.

The indignities have piled up and compounded in ways few could have imagined. After housing prices shot up in the early 2000s, when commuters from the San Francisco Bay area bought and built up homes here, the median home price plummeted by more than 60 percent in the last five years. In the first half of this year, the city had the highest foreclosure rate of any in the country, according to RealtyTrac, a company that collects foreclosure data. While it has come down a few points in recent months, for the last few years the unemployment rate hovered around 17 percent, nearly double the national average.

While Stockton’s bankruptcy troubles can be traced in part to the collapse of the housing market and the subsequent erosion of the city’s tax base, for years city leaders also mismanaged and overspent funds, pushing the city into financial peril, analysts and current city officials say. Stockton cannot afford the $417 million it owes for retiree health benefits, city officials say, and this year a bank repossessed city-owned parking garages and a $40 million building the city had bought with plans for an upgraded City Hall.

Since 2009, the city has cut 25 percent of its police officers, 30 percent of its Fire Department and over 40 percent of all other city employees. And while the Police Department has started hiring again, much ground has already been lost. Last year, there were 58 homicides here, a record. Halfway through 2012, there have already been 35. Other cities across the state are also teetering. On Wednesday night, city leaders in San Bernardino, Calif., voted to declare a fiscal emergency, which would allow the city to file for bankruptcy within 30 days.

After the three burglaries, Ms. Hinson and her husband, John Hinson, 68, a retired city finance director, installed an alarm system, video cameras and a locking gate at their home. But when the alarm goes off, which it has on several occasions, they say the police do not come. “They used to serve and protect, but now they can’t protect us anymore,” said Ms. Hinson, who works for a company that manages homeowner associations. “We have to protect ourselves.”