Detroit is contending to become Amazon’s second home. The e-commerce giant — based out of Seattle — is looking to open up an HQ2 as a second base of operations in a city with a metro population of at least one million people. It is estimated Amazon would create 50,000 jobs paying an average of $100,000 per year.

A few years ago, the notion of Detroit as a contender would have been met with skepticism and likely a few laughs; today, it’s a real possibility — thanks in part to private philanthropy.

After the 2008 financial crisis, Detroit was in free fall. City pensions were on the verge of insolvency. The city’s major automotive employers were pennies away from collapse. The unemployment rate hit a near record high of 28.4 percent. And the city was $18 billion in debt.

Because of the weakness in city finances, some of Detroit’s historic icons were on the chopping block. One of the threatened institutions was the almost 130-year-old Detroit Institute of Arts — a world class facility housing priceless paintings, drawings, and sculptures. In order to pay down some of the city’s enormous debts, some proposed the collections be sold off piece by piece.

But as many in the community came to realize, that fix would simply be a Band-Aid. A more permanent solution needed to be concocted.

In an attempt to save the art collection, as well as the city, a group of risk-tolerant private philanthropists and foundations worked together to form the “grand bargain.” In the end, the coalition of donors were able to pool together nearly $1 billion dollars. The unprecedented level of financial aid came from 12 foundations — most notably $125 million from the Ford Foundation, $100 million from the Kresge Foundation, and $30 million from the Knight Foundation.

Private organizations also filled a less traditional role after the economic collapse. For example, Midtown Detroit Inc. — a nonprofit aimed at community development — performed roles usually filled by public agencies. This included rezoning neighborhoods, installing streetlights, maintaining parks, and even helping pay government salaries. Other organizations, like the Kresge and Skillman Foundation, donated police cars and implemented safety patrols.

Quicken Loans founder and Detroit billionaire Dan Gilbert invested billions of his own money to revitalize the city. He has been heavily involved in demolishing blighted homes, reviving downtown areas, and moving jobs to the city.

Detroit is a prime example of how community leaders can team up with philanthropic organizations and individual donors to improve living standards, increase financial stability, and strengthen cultural and arts programs. But these acts of generosity are not limited to Detroit.

As described in the soon-to-be-released “Compact Edition of The Almanac of American Philanthropy,” donations to expand the use of charter schools have greatly improved education vehicles in inner-cities, especially for low-income and minority students. In 2016, as part of a 10-year anniversary initiative, a total of $35 million was donated to Success Academy Charter Schools — a network of New York charter schools responsible for transforming some of the city’s worst performing students into the top 1 percent for math and 3 percent for reading. They have even outperformed schools located in New York’s most affluent areas.

In Memphis, Pitt and Barbara Hyde — recipients of the 2017 William E. Simon Prize for Philanthropic Leadership — also worked to improve underperforming schools. They provided early financial support for the Memphis Education Fund — a network of schools, human capital groups, and activists who fight to improve the bottom 10 percent of public schools. The Hydes have also been notably generous to Memphis’ Jubilee Catholic Schools, supporting the effort known as the “Memphis miracle,” the reopening of previously shuttered Catholic schools serving disadvantaged children.

Back in Detroit, the New Economy Initiative, a collaboration of 10 foundations, collected $100 million in 2007 (and added $33.25 million in 2014) with the bold goal of returning the city to its position as a global economic leader by recognizing and encouraging entrepreneurship as a powerful means of diversifying and strengthening the region’s economy.

Private foundations and philanthropy groups have played a major role in bolstering cities economically, culturally and educationally. Their part in saving Detroit from economic insolvency and launching a rebuilding process has been crucial. Donors have given one of America’s most troubled cities a chance to be a comeback city. And now, Detroit’s contention for Amazon’s HQ2 is no laughing matter.

Jo Kwong is director of economic opportunity programs at The Philanthropy Roundtable.