If the American dream has not quite shattered as the Millennial generation has come of age, it has certainly scattered. Living affordably and trying to climb higher than your parents did were once considered complementary ambitions. Today, young Americans increasingly have to choose one or the other—they can either settle in affordable but stagnant metros or live in economically vibrant cities whose housing prices eat much of their paychecks unless they hit it big.

The dissolution of the American dream isn’t just a feeling; it is an empirical observation. In 2014, economists at Harvard and Berkeley published a landmark study examining which cities have the highest intergenerational mobility—that is, the best odds that a child born into a low-income household will move up into the middle class or beyond. Among large cities, the top of the list was crowded with rich coastal metropolises, including San Francisco, San Jose, Los Angeles, San Diego, and New York City.

Last fall, Jed Kolko, the chief economist for the online real-estate marketplace Trulia, published a study of housing affordability, which looked at homeowners’ monthly payments in each city relative to the area’s median income. By Kolko’s measure, the 10 least affordable cities in the country included, predictably and dispiritingly, San Francisco, San Jose, Los Angeles, San Diego, and New York City. The most affordable were strewn through the Rust Belt and the Deep South, where people have become detached from the more dynamic parts of the economy.

These studies, and similar findings, tap into a broader worry. When a city grows rich, its wealth tends to outpace its housing supply, forcing prices higher and making vast swaths of the city unaffordable for middle-class families. And once the rich are ensconced, they typically resist the development of more housing, especially low-income housing, anywhere in their vicinity. In America’s 100 biggest metro areas, six in 10 homes are considered “within reach” of the middle class. But in the 20 richest cities, fewer than half are.

Only three large metros where at least half the homes are within reach for young middle-class families also finish in the top 10 in the Harvard-Berkeley mobility study: Salt Lake City, Pittsburgh, and Minneapolis–St. Paul. The last is particularly remarkable. The Minneapolis–St. Paul metro area is richer by median household income than Pittsburgh or Salt Lake City (or New York, or Chicago, or Los Angeles). Among residents under 35, the Twin Cities place in the top 10 for highest college-graduation rate, highest median earnings, and lowest poverty rate, according to the most recent census figures. And yet, according to the Center for Housing Policy, low-income families can rent a home and commute to work more affordably in Minneapolis–St. Paul than in all but one other major metro area (Washington, D.C.). Perhaps most impressive, the Twin Cities have the highest employment rate for 18-to-34-year-olds in the country.

What’s wrong with American cities? is a question that demographers and economists have debated for years. But maybe we should be looking to a luminary exception and asking the opposite question: What’s right with Minneapolis?

In the mid-1800s, companies that included the forerunners of Pillsbury and General Mills sprang up along the Saint Anthony Falls, the only major waterfall on the Mississippi River, in the center of Minneapolis. They saw in its cascade the ideal setting for water-powered mills. But when they tried to tunnel under the bedrock in 1869, the limestone collapsed, altering the falls. Thanks to a giant engineering project led by the Army Corps of Engineers, the falls were permanently restored in 1885. Although it hardly matches the sublime natural drama captured by 19th-century painters, the Minneapolis landmark still flows, rarely floods, and never breaks.

Myron Orfield, the director of the Institute on Metropolitan Opportunity at the University of Minnesota, recently described to me this short but perfect waterfall, “the ideal size for milling,” and I couldn’t help but think that the Saint Anthony Falls were a metaphor for the city’s advantages: a blend of geographical blessings and thoughtful city planning—all of which, to an outsider, looks deceptively boring.

The Twin Cities’ geographical blessings are subtle. Unlike America’s coastal megatropolises, Minneapolis doesn’t benefit from a proximity to other rich cities and their intermingling of commerce. Instead, it’s so far from other major metros that it’s a singular magnet for regional talent. “There’s basically nothing between us and Seattle, so we’ve historically had all these smaller cities in Iowa, Nebraska, the Dakotas, and Montana that are our satellites,” Orfield told me.

Minneapolis–St. Paul is the headquarters for 19 Fortune 500 companies—more than any other metro its size—spanning retail (Target), health care (UnitedHealth), and food (General Mills). In the past 60 years, 40 Minneapolis-based businesses have made it onto Fortune’s list. “We’re not like Atlanta, where half of its Fortune 500s moved there,” Myles Shaver, a professor at the Carlson School of Management at the University of Minnesota, told me. “There is something about Minneapolis that makes us unusually good at building and keeping large companies.”

Shaver’s theory, which he’s developing into a book, is that Minneapolis is so successful at turning medium-size companies into giants because its most important resource never leaves the city: educated managers of every level, who can work at just about any company. Shaver looked at the outward migration of employed, college-educated people who earn at least twice the national average income—his proxy for the manager demographic—and found that of the 25 largest American cities, only one had a lower rate of outflow than Minneapolis (although he couldn’t compute data for three others). Among all college-educated workers, Minneapolis also had the second-lowest outflow. “It bears out the old adage: ‘It’s really hard to get people to move to Minneapolis, and it’s impossible to get them to leave.’ ”

Why is that? And how has the city stayed so affordable despite its wealth and success? The answers appear to involve a highly unusual approach to regional governance, one that encourages high-income communities to share not only their tax revenues but also their real estate with the lower and middle classes.

In the 1960s, local districts and towns in the Twin Cities region offered competing tax breaks to lure in new businesses, diminishing their revenues and depleting their social services in an effort to steal jobs from elsewhere within the area. In 1971, the region came up with an ingenious plan that would help halt this race to the bottom, and also address widening inequality. The Minnesota state legislature passed a law requiring all of the region’s local governments—in Minneapolis and St. Paul and throughout their ring of suburbs—to contribute almost half of the growth in their commercial tax revenues to a regional pool, from which the money would be distributed to tax-poor areas. Today, business taxes are used to enrich some of the region’s poorest communities.

Never before had such a plan—known as “fiscal equalization”—been tried at the metropolitan level. “In a typical U.S. metro, the disparities between the poor and rich areas are dramatic, because well-off suburbs don’t share the wealth they build,” says Bruce Katz, the director of the Metropolitan Policy Program at the Brookings Institution. But for generations now, the Twin Cities’ downtown area, inner-ring neighborhoods, and tony suburbs have shared in the metro’s commercial success. By spreading the wealth to its poorest neighborhoods, the metro area provides more-equal services in low-income places, and keeps quality of life high just about everywhere.

For decades, Minneapolis was also unusually successful at preventing ghettos from congealing. While many large American cities concentrated their low-income housing in certain districts or neighborhoods during the 20th century, sometimes blocking poor residents from the best available jobs, Minnesota passed a law in 1976 requiring all local governments to plan for their fair share of affordable housing. The Twin Cities enforced this rule vigorously, compelling the construction of low-income housing throughout the fastest-growing suburbs. “In the 1970s and early ’80s, we built 70 percent of our subsidized units in the wealthiest white districts,” Myron Orfield said. “The metro’s affordable-housing plan was one of the best in the country.”

The region’s commitment to dispersing affordable housing throughout the metro area has since diminished. But the fiscal-equalization plan has proved durable.

The Twin Cities’ housing and tax-sharing policies have resulted in lots of good neighborhoods with good schools that are affordable for young graduates and remain nice to live in even as their paychecks rise. This, in turn, has nurtured a deep bench of 30- and 40-something managers, who support the growth of large companies, and whose taxes flow to poorer neighborhoods, where families have relatively good odds of moving into the middle class.

It’s an open question whether the ingredients of the Minneapolis miracle can be packed and shipped to other cities as neatly as its Pillsbury cookies. Minnesota and other states in the Midwest with cheap housing are blessed with land in all directions. Coastal cities are forever bounded by the world’s least developable real estate—the ocean. Yet cities such as San Francisco are also infamous for resisting the construction of new affordable housing.

No other large American city has adopted a plan like Minneapolis’s to sprinkle business taxes across a region in order to keep the poorest areas from falling too far behind. But in 2008, Seoul imported a version of Minneapolis’s tax-sharing scheme. Since then, the gap in funding for social services among the city’s districts has narrowed. According to a 2012 analysis by Sun Ki Kwon, then a graduate student at the University of Kentucky, this has helped Seoul’s poorest communities grow their tax bases while only minimally affecting the city’s richest districts.

One reason the American dream has come apart is that too few cities have shared their resources—and real estate—between the rich and the rest. This isn’t a fact of nature, like the mountains and oceans that restrain our coastal metros. It is a policy of our own choosing. The lesson of Minneapolis is that even our richest cities are free to make a different choice.