For Americans without an elite profession, connections or education, cities were once the ultimate ticket to the middle class.

This held particularly true for black workers who moved from smaller communities to cities to be factory and construction workers, office assistants and salespeople supporting the countries’ fast-innovating urban economies. They earned a substantial premium over their small-town counterparts.

Around the turn of the millennium, something broke, new data suggests. Moving to cities is still a pretty good choice for most white people. But for black Americans, especially those without a college degree, cities no longer guarantee the kinds of opportunity they used to.

Consider the below chart, part of a new report by leading labor economist David Autor of the Massachusetts Institute of Technology. Autor calculates growth rates from 1980 to 2015, then measures how different those growth rates have been in the biggest cities vs. smaller ones. Here, Autor calculates that since 1980, pay for urban white people with college degrees increased between 6 percentage points for men and 13 percentage points for women more quickly than it did for their small-community counterparts — even after adjusting for inflation. He did this by comparing Census Bureau data for the most urban quarter of the country with the least urban one.

For whites without a college education, this urban premium has remained steady. But for black people without a college degree, the urban premium has plummeted. Black men in big cities saw their wages grow 17 points more slowly than their small-community counterparts; for black women, the gap was 13 points.

Even college-educated black Americans have seen fewer gains, while educated white folks have thrived in cities. Hispanic Americans are in a similar, albeit less pronounced, situation.

“An increasing share of GDP is produced by just a relatively small handful of superstar cities and people are paying an arm and leg just to get in there,” Autor said. “And that’s where you go if you’re highly educated and highly specialized. So college grads have done well in urban places, but white college graduates have done much better than blacks and Hispanics.”

The wage growth gap doesn’t even factor in housing costs, Autor said. When accounting for housing and other cost-of-living factors, less-educated, urban black and Hispanic workers earn less now than they would have made compared with their small-city counterparts in 1980.

What happened? Automation replaced many of the jobs that had lifted less-skilled workers into the middle class. By the turn of the millennium, corporations had turned to spreadsheets, fancy phone systems and robots to replace specialists in many repetitive jobs. Lower-paying service sector jobs at restaurants, retailers and hotels rose up to take their place.

Plus, many middle-class factory and manufacturing jobs that lured African Americans to big cities during the Great Migration have been automated or completely lost, as companies moved jobs to lower-wage countries such as Mexico and, particularly, China after 2000.

“Middle-skill work that was available was no longer available. And so they are crowded into a narrower set of traditionally lower-paid, lower-productivity occupations,” Autor said.

The pattern of occupational polarization will be familiar to anyone who has followed Autor’s work, but his newest research adds an important dimension.

“Polarization has not been evenly felt. It’s much more concentrated among minorities,” said Autor, who also helps direct the MIT Task Force on the Work of the Future, which released the study. “Changes in occupational structure, in cities, have been larger and arguably less favorable among blacks and Hispanics than among whites.”

First, consider the plight of big-city college graduates. Especially among black and Hispanic college graduates, middle-wage jobs have decreased relative to the smallest communities, but the decline is somewhat subdued and — for many of these most-educated workers — somewhat offset by gains in higher-skill jobs.

When you look at that pattern for city-dwelling workers without a bachelor’s degree, the labor-market carnage becomes immediately evident. The losses of middle-wage jobs are much more severe, especially for black and Hispanic workers. These jobs have been replaced almost entirely by low-paying roles such as janitors, cooks, waiters, transportation workers, repair workers and security guards.

With that in mind, look at Autor’s charts showing how cities were once engines of middle-class opportunity for all workers, but evolved to be the province of the top-earning elite and the less-educated, low-paid workers who serve them. Focus on the slope of each line. When it’s higher toward the right, it means people are earning more in big cities than they are in the smallest ones. That’s the urban wage premium.

For college grads, the line just keeps getting steeper, meaning cities are paying graduates more and more. Meanwhile, in 1980 the urban premium for less-educated workers is about equal to that of their educated peers, but the relationship soon breaks down. By 2015, the line is almost flat, indicating less-educated workers don’t earn much more in major cities than they do in tiny ones. And overall, their urban wages have actually deteriorated, adjusting for inflation.

“What we learn from Autor’s work is that non-college workers can no longer expect that moving to a high-paying city will be a mechanism of upward mobility,” said Melissa Kearney, a University of Maryland labor economist. Kearney was not directly involved in the research, but she directs the Economic Strategy Group at the Aspen Institute, which commissioned the paper.

Less urban areas have changed too, exacerbating the gap between big cities and small ones. Over the years, smaller cities — think Cumberland, Md.; Duluth, Minn. or Santa Fe, N.M. — find their demand for skilled workers increasing, even as they have fewer and fewer workers available, Autor said.

He found that, outside of large cities — such as New York, San Francisco or Tampa — workers without a college education are moving into managerial roles.

“Growing inequality is not just about robots and automation eliminating middle-skill jobs, said Elisabeth Reynolds,” executive director of the MIT task force. “Other factors have contributed, including import competition in manufacturing, a stagnant federal minimum wage and a decline in unions.

“There’s a host of different policy decisions that have been taken that have, in the end, weakened the position of workers in terms of their earnings as well as their voice,” she said.

Now, it seems, there’s a new layer of difficulty for black and Hispanic workers, on top of less wage growth in big cities.

“Minority populations are bearing the public health and economic costs of this current pandemic recession harder than others,” Kearney said. “This is just another episode where we’re seeing that the least advantaged among us are bearing the largest burdens.”

Many less-educated, minority workers already have lost their jobs. Just half of the black adult population is employed, and the service industry will never be the same. Autor points out that, as white-collar workers use their newfound work-from-home leverage to scatter throughout the country, service-industry workers will once again be left behind.

“Our whole understanding of urban and service-related jobs will be shifted,” Reynolds said. “Things will change after this. There will be jobs that don’t come back.”