Blue-collar workers poured into the cavernous auto plants of Detroit for generations, confident that a sturdy back and strong work ethic would bring them a house, a car and economic security. It was a place where the American dream came true.

It came true in cities across the industrial heartland, from Chicago's meatpacking plants to the fire-belching steel mills of Cleveland and Pittsburgh. It came true for decades, as manufacturing brought prosperity to big cities in states around the Great Lakes and those who called them home. Detroit was the affluent capital, a city with its own emblematic musical sound and a storied union movement that drew Democratic presidential candidates to Cadillac Square every four years to kick off campaigns at Labor Day rallies.

The good times would not last forever. As the nation's economy began to shift from the business of making things, that line of work met the force of foreign competition. Good-paying assembly line jobs dried up as factories that made the cars and supplied the steel closed their doors. The survivors of the decline, especially whites, fled the cities to pursue new dreams in the suburbs.

The "Arsenal of Democracy" that supplied the Allied victory of World War II and evolved into the "Motor City" fell into a six-decade downward spiral of job losses, shrinking population and a plummeting tax base. Detroit's singular reliance on an auto industry that stumbled badly and its long history of racial strife proved a disastrous combination, and ultimately too much to overcome.

"Detroit is an extreme case of problems that have afflicted every major old industrial city in the U.S.," said Thomas Sugrue, author of "The Origins of the Urban Crisis: Race and Inequality in Postwar Detroit" and a history professor at the University of Pennsylvania. "It's been 60-plus years of steady disinvestment, depopulation and an intensive hostility between the city, the suburbs and the rest of the state."

All of the nation's industrial cities fell, but only Detroit hit bottom. Staggering under as much as $20 billion in unpaid bills, Detroit surrendered Thursday, filing the single largest municipal bankruptcy in American history.

"What happened in Detroit is not particularly distinct," said Kevin Boyle, a history professor at Northwestern University who has written extensively about his hometown. "Most Midwest cities had white flight and segregation. But Detroit had it more intensely. Most cities had deindustrialization. Detroit had it more intensely."

Detroit's first wave of prosperity came after World War I and lasted into the early 1920s, driven by the rise of the auto industry. "It was the Silicon Valley of America," Boyle said. "It was home to the most innovative, cutting-edge dominant industry in the world. The money there at that point was just staggering."

More affluence followed in the late 1940s and early 1950s as the auto industry was booming. Tens of thousands of blacks migrated from the South seeking jobs on the assembly line and a foothold in the middle class. In 1950, Detroit's population peaked as a metropolis of more than 1.8 million, making it the nation's fifth-largest city. The transformation was dramatic.

"You've got a vast city of working people who no longer have insecure lives, people with high school and less than high school degrees who can earn enough to buy a house, a car, a boat, and sent their kids to Wayne State University," Boyle said.

But by that time, Detroit's decline had already begun.

The auto industry had started to expand beyond the city and was building plants and putting offices in suburban and rural areas, and eventually sought refuge from the city's powerful unions in the nation's Sunbelt states and even overseas. Between 1947 and 1963, Detroit lost 140,000 manufacturing jobs, said Sugrue, the Pennsylvania professor.

A decade later, as Japanese auto imports started gobbling more of the U.S. market, the hemorrhaging of jobs continued. Membership in the United Auto Workers topped out at 1.5 million in 1978 and stands today at about 400,000, said Mike Smith, the union's archivist at Wayne State University's Walter Reuther Library.

"In a way, it's not unlike a small town that has a textile factory for 50 years, then all of a sudden it closes up and the whole town is decimated," Smith said.

It wasn't an uncommon plight: The cities that rose alongside Detroit came to be known as the Rust Belt.

Like Detroit, Pittsburgh was a community defined by its dependence on a single industry. But as steelmaking crumbled under pressure from foreign imports and the decline of the U.S. auto industry, the city's population dropped by more than 40 per cent between 1970 and 2006, according to a 2013 report from the U.S. Federal Reserve Bank of Cleveland.

But during those years, Pittsburgh also forged a new identity around health care and technology. It retrained former steelworkers, invested heavily in higher education and launched a controversial campaign to redevelop more than 1,000 acres of industrial brownfields, replacing decaying lots with luxury homes, office and retail buildings, and 27 miles of riverfront parks.

Detroit's unraveling can't be blamed solely on the city's reliance on one industry that itself buckled. Some point to the city's political leadership and its reluctance over the years to make tough decisions.

"I think it (the fiscal disaster) was inevitable because the politicians in Detroit were always knocking the can forward, not confronting the issues, buying off public employees by increasing their pensions," said Daniel Okrent, a Detroit native who wrote a Time magazine cover story on the city in 2009. "They were always kind of confronting the impending crisis by trying to make it the next guy's crisis."

Racial strife also infected the city. Sugrue, the Pennsylvania professor, said some of the tensions surfaced long before the city's infamous 1967 riots. Two decades earlier, between 1945 and 1965, he said, there were more than 200 violent racial incidents of whites attacking blacks in Detroit and almost all stemmed from the first or second black families moving into an all-white neighbourhood.

The migration of blacks into Detroit, which helped power its economic rise, was followed by an exodus of white residents for the suburbs. In the last decade alone -- from 2000 to 2010 -- Detroit lost about a quarter-million residents. The city's current population of roughly 700,000 is about 83 per cent black.

"Unlike cities such as Chicago or Philadelphia, where segregation produced disinvestment in certain neighbourhoods, the nature of segregation in Detroit meant that the entire city suffered disinvestment," Douglas Massey, a sociology and public affairs professor at Princeton, said in an email.

What's left is a Detroit defined by a barren landscape of deserted neighbourhoods and abandoned buildings that overwhelms the very recent rebound in parts of downtown. The consequences of that population loss and segregation extend beyond the declining property values and erosion of the city's tax base. The result is an isolated city.

"The racial divisions between the city and the suburbs until very recently remained very hard and fast, creating an us vs. them mentality," Sugrue said. "There's very little political will ... by suburbanites and other parts of the state to provide financial support."

Indeed, it was the state's Republican governor, Rick Snyder, who ultimately pushed control of the overwhelmingly Democratic city's decrepit finances into the hands of an emergency manager and signed off from the state capital in Lansing to his recommendation that Detroit file for bankruptcy. There appears to be little appetite there for a bailout.

"Cities are less powerful in the federal government and state capitals that they were 40 years ago," Sugrue said.

For those directly impacted by the collapse, watching the deterioration of Detroit in recent years has been agonizing.

"The neighbourhood is so different -- the street lights go off, there's more violence and gunfire, the elementary school I went to is closed and boarded up," said Sareta Cheathem, a filmmaker and screenwriter who has lived in Detroit all her 42 years. "I remember as a child winning the 'beautiful block' awards . just to see the decay is something that bothers me."

Cheathem said her 92-year-old neighbour was robbed last year and thieves have tried to break into her home and garage. "My heart won't let me leave," she said, later adding, "One more attack and I'm out."

As for the bankruptcy filing, Cheathem said that has been "gutwrenching" and leaves her wondering "Is it going to get worse? Can it get any worse?"

Or will it signal the beginning of Detroit's turnaround and comeback?

Boyle, the history professor, has reservations about what is actually possible in a place that's fallen so far.

"I don't think it'll ever come back to the city it once was," he said. "The bankruptcy is not in itself a solution. It will presumably clear the debt. Something will have to happen for it not to repeat this pattern five or 10 years from now. Hopefully this will make life livable in this city. I think it's doable. But I'm not sure there's the will to do it."