Before the city of San Bernardino, California, was struck with a harrowing and deadly mass shooting Wednesday, it was struggling with a financial crisis.
San Bernardino declared bankruptcy in 2012. It has been forced to make deep cuts in services.
Residents complain of potholes in the streets, parks in disarray and slow emergency response times.
Only a few years ago, the city had about 340 police officers. Now it has under 260. Lifelong resident Gary Saenz believes San Bernardino is the most under-policed city in the state of California. Saenz is the City Attorney, an elected position that means he represents the city in the bankruptcy process.
"As a city, we have many challenges we were already confronting at the time we were hit with this tragedy," he told CNNMoney.
Related: Mass shooting at Inland Regional Center: What we know
No evidence that police cuts played a role
As part of its plan to balance its budget, the city is also outsourcing trash collection and trying to have the county take over the city fire department.
But Saenz says the city was legitimately turning around before tragedy struck this week. A judge still has to approve the city's plan to get out of bankruptcy, but at least there was a roadmap.
The savings from outsourcing trash and firefighting are supposed to free up money so the city can pave its roads again and hire more police.
Even with the cuts, the city's police force has received praise for how it handled the mass shooting at the Inland Regional Center Wednesday.
"That did not have an impact as far as I know on our ability to adequately do whatever was necessary," says Saenz.
Related: Shooters were married
How San Bernardino got this bad
San Bernardino filed for bankruptcy in August 2012 -- about a year before Detroit.
The city had nearly a $50 million budget shortfall (out of an annual budget of roughly $250 million). It also had massive unfunded pension liabilities for police, firefighters and city workers that were even worse.
"Since the bankruptcy, there's been a lot of services that have taken a decline," says Denae Holloway, pastor of the Kingdom Culture Worship Center, a Christian church downtown.
A lot of people come to the church because they have nowhere to live. Affordable housing is a big problem, Holloway says, especially after the city closed a development agency to cut costs.
Holloway is originally from Pasadena, California. Even before this week's tragedy, friends and family back home would repeatedly say to her, "Why are you going downtown? It's so dangerous."
Related: Killer was in touch with terror subjects, officials believe
Turnaround starting to take root
But Holloway sees changes taking root. She's met Mayor Carey Davis, and she posted on Instagram under the hashtag #IamSanBernardino earlier this year to try to raise awareness about the great people in the community.
Despite concerns about not enough police, she has always felt safe. The first church building was in an area known as "Little Africa." She never saw drugs or shootings that people claimed were commonplace there.
"This is a city that will rise from even this tragedy," Holloway told CNNMoney. In her early 30s, she plans to stay and be part of an urban renaissance.
San Bernardino is a city of just over 200,000 residents. Saenz was elected in 2013 after voters were so fed up with the bankruptcy that they ousted the mayor at the time and the City Attorney, who had served for 26 years in office.
Bankruptcy seems like a small problem now
Getting out of bankruptcy will be a long process. The city has proposed paying some bondholders only a penny for every dollar of the nearly $50 million they are owed. Not surprisingly, bondholders are fighting that.
There's tangible hunger for change in the city, including a movement of young people called San Bernardino Generation Now that organizes arts events. A developer is also actively working with the city to re-develop a mall smack in the center of the city.
Residents say they feel more united than ever. Saenz and many others in the city have been stunned by the "outpouring of generosity" since the shooting.
"The problems we've had with respect to bankruptcy and potholes in our streets. Those things are small in comparison to the tragedy we've just endured," says Saenz.