Six months ago, Detroit became the largest city in American history to file for bankruptcy. To follow the news as the media reported it, with profile after profile of the Motor City’s pension woes and declining industrial base, it seemed all but inevitable.

Perhaps more importantly, it got commentators looking at other economically depressed cities. Before last July, large-scale municipal bankruptcy seemed unthinkable—even in a city as troubled as Detroit. Now, though, we seem to be constantly debating which post-industrial metropolis will be next.

But half a year later, do we really have any better sense of when a city is truly on the brink of collapse?

That’s what Alicia H. Munnell, a TCF trustee and the director of the Center for Retirement Research at Boston College, set out to determine alongside a team of colleagues.

According to their study, one factor, above all others, indicates when a city is likely headed toward collapse: population decline.

To those who have been following Detroit’s downfall, this may seem self-evident. The proliferation of apocalyptic photos of abandoned Detroit aside, the city has struggled to provide even the most basic of municipal services with the money it takes in from its increasingly meager tax base. Half the streetlights don’t work, and emergency response times can be upward of an hour.

But for all the talk that Detroit needs to “right-size” itself, population loss is merely a symptom of far deeper problems.

How can we be sure? Because, among cities that have lost 50 percent or more of their population, Detroit has a companion that’s much better off.

That would be St. Louis. As of the 2010 census, the Gateway City had lost 62.7 percent of its 1950 population, a decline greater than Detroit’s (though 2013 estimates show Detroit may now have surpassed it).

Twin Cities

To be sure, St. Louis is no urban utopia. Among other problems, it perpetually ranks among America’s most dangerous cities, a fact that was the subject of a much-discussed New York Times article last fall.

Still, it is no Detroit. It maintains a solid A+ bond rating from Standard & Poor’s, has lower unemployment than Detroit, and, most importantly, isn’t bankrupt—even though its population is still declining.

But should St. Louis’s history make Detroit’s boosters optimistic?

Not necessarily. As it turns out, the factors keeping St. Louis stable underline precisely what made Detroit so unstable. While the latter remains dependent on the auto industry, the former features a diversified regional economy, with respected research institutions like Washington University and Barnes-Jewish Hospital leading the “eds and meds” side. Meanwhile, Monsanto, Boeing, and Enterprise Rent-a-Car anchor St. Louis’s manufacturing and services sectors.

The most important factor, however, may be St. Louis’s racial landscape. For a city that has lost so much of its population, it remains surprisingly diverse, with about equal numbers of white and black residents.

This isn’t to say that the city isn’t segregated—maps of census data show it patently is. But having a multiracial city makes it easier to cooperate and forge policies on a regional level—unlike in Detroit, where the relationship between city and suburbs still carries heavy overtones of white flight.

Not Out of Options

Still, there are certain, smaller ideas that Detroit could take from St. Louis’s precedent. At the height of the city’s problems in the 1980s, St. Louis mayor Vincent Schoemehl implemented several policies designed to improve quality of life for city residents in small ways. One was a giant urban beautification program, which saw workers plant millions of daffodils across the city. Another subsidized the cost of deadbolts, window bars, and steering-wheel clubs for city residents.

Neither of these programs can save Detroit, but they show the power of an urban revitalization predicated on the “broken windows” theory and were credited with keeping up morale during a trying time in St. Louis’s history.

As Detroit begins its rebuilding while the courts resolve its financial issues, strategies like these are worth keeping in mind. It’s too late for Detroit to be St. Louis. But with only half of its property owners confident enough in their city to bother paying property taxes, morale is something the Motor City could sorely use.