The city of Detroit, which for years paid its bills with borrowed money, is the largest city in U.S. history under bankruptcy protection. Here's a look at how the city spiraled into financial ruin and why it's in so much trouble:

WHAT HAPPENED?

For decades, Detroit paid its bills by borrowing money while struggling to provide the most basic of services for its residents. The city, which was about to default on a good chunk of a long-term debt exceeding $18 billion, now is getting a second chance in a federal bankruptcy court-led restructuring. Kevyn Orr, Detroit's state-appointed emergency manager, chose bankruptcy over diverting money from police, fire and other services to make debt payments. The move conserves cash so the city can operate, but it will hurt Detroit's image for years. It will also leave creditors with much less than they are owed and places in jeopardy the pension benefits of thousands of city retirees.

WHY DID IT HAPPEN?

It took decades of decay to bring down the once-mighty industrial giant that put the world on wheels. The city grew to 1.8 million people in the 1950s, luring them with plentiful jobs that paid good wages to stamp out automobiles for sale across the globe. But like many American cities, Detroit's fall began late that decade as developers starting building suburbs. Then came the 1967 riots that accelerated the number of white residents who moved to the cities north of Eight Mile Road, considered the region's racial dividing line. At the same time, auto companies began opening plants in other cities, and the rise of autos imported from Japan started to cut the size of the U.S. auto industry. Detroit's property values fell, tax revenue dropped, police couldn't control a growing murder rate and many middle-class blacks fled the city for safer suburbs with better schools. By 2009, the auto industry collapsed along with the economy as a whole, eventually pulling the city down with it. Government corruption under former Mayor Kwame Kilpatrick only made things worse. In the 2000 census, Detroit's population fell under 1 million as the exodus continued. Today, it's about 700,000.

DID THE AUTO INDUSTRY'S FALL DRAG DOWN DETROIT?

It's a big factor. The city is littered with abandoned factories built in the postwar boom years, most of which have multiple stories. As the Japanese auto invasion began cutting into Detroit's sales, General Motors, Chrysler, Ford and hundreds of auto parts companies looked outside the city to build one-story plants that could handle modern assembly lines. With every downturn, more companies abandoned the city, leaving the hulking buildings to squatters. Detroit's tax base continued to erode. By the time the auto industry melted down in 2009, only a few factories from GM and Chrysler were left. GM is the only one with headquarters in Detroit, though it has huge research and testing centres with thousands of jobs outside the city.

WHERE ELSE HAS THIS HAPPENED?

Before Detroit, the largest local government bankruptcy filing was in Jefferson County, Ala., in November 2011. The county cited more than $4 billion in debt, mostly from corrupt deals involving sewer financing that fell apart when the home mortgage crisis hit in 2008. A federal judge in November approved a plan calling for creditors to reduce the county's roughly $3 billion debt from sewer construction by about half and for the county to issue nearly $1.8 billion in new debt while raising sewer rates annually. The city has officially emerged from bankruptcy. Jefferson County has nearly 700,000 people, which is similar in size to Detroit, and includes the city of Birmingham. The economic crisis also caused bankruptcies of smaller cities. The California cities of Stockton, San Bernardino, and Mammoth Lakes all filed for bankruptcy in 2012. Stockton and San Bernardino were hit by plummeting home values during the recession, which cut property and sales taxes, while Mammoth Lakes was overwhelmed by a $43 million breach-of-contract judgment brought against it by a developer.

Comments on this story are pre-moderated and approval times may vary. Before they appear, comments are reviewed by moderators to ensure they meet our submission guidelines. Keep it clean, keep it civil, keep it truthful, stay on topic and be responsible. Comments are open and welcome for three days after the story is published. We reserve the right to close comments before then. Comments that appear on the site are not the opinion of Castanet, but only of the comment writer.