In cities across America, the middle class is hollowing out.

A widening wealth gap is moving more households into either higher- or lower-income groups in major metro areas, with fewer remaining in the middle, according to a report released Wednesday by the Pew Research Center.

In nearly one-quarter of metro areas, middle-class adults no longer make up a majority, the Pew analysis found. That’s up from fewer than 10 percent of metro areas in 2000.

Pew defines the middle class as households with incomes between two-thirds of median income and twice the median, adjusted for household size and the local cost of living. The median is midway between richest and poorest. By Pew’s definition, a three-person household was middle class in 2014 if its annual income fell between $42,000 and $125,000.

Middle-class adults now make up less than half the population in such cities as New York, Los Angeles, Boston and Houston.

That sharp shift reflects a broader erosion that occurred from 2000 through 2014. Over that time, the middle class shrank in nine out of every 10 metro areas, Pew found.

“The shrinking of the American middle class is a pervasive phenomenon,” said Rakesh Kochhar, associate research director for Pew and the lead author of the report. “It has increased the polarization in incomes.”

The squeezing of the middle class has animated this year’s presidential campaign, lifting the insurgent candidacies of Donald Trump and Bernie Sanders. Many experts warn that widening income inequality may slow economic growth and make social mobility more difficult.

Academic research has found that compared with children in more economically mixed communities, children raised in predominantly lower-income neighborhoods are less likely to move into the middle class.

Wendell Nolen, 52, has experienced the slide from middle-class status first-hand. Eight years ago, he was earning $28 an hour as a factory worker for Detroit’s American Axle and Manufacturing Holdings, assembling axles for pickup trucks and SUVs.

But early in 2008, the good life unraveled. After a three-month strike, Nolen took a buyout rather than a pay cut. Less than a year later, the plant was closed and American Axle shipped much of its work to Mexico.

Now Nolen makes $17 an hour in the shipping department of a Detroit steel fabricator, about 40 percent less than he made at the axle plant.

“America is losing jobs because of the free trade stuff,” Nolen said. “They’re selling America out.”

Nationally, the proportion of middle-class adults shrank to 51 percent in 2014 from 55 percent in 2000, Pew found. Upper-income adults now constitute 20 percent of the population, up from 17 percent. The lower-income share has risen to 29 percent from 28 percent.

Yet the changes have been much more dramatic at the local level. There are now 79 metro areas in which the proportion of adults in upper-income households equals or exceeds the national average of 20 percent. That’s more than double the 37 cities in which that was true in 2000.

The trend hasn’t been quite as pronounced in the other direction: In 103 metro areas, 29 percent or more of adults now live in poor households, up from 92 in 2000.

The report studied 229 of the largest US metro areas, which constituted 76 percent of the US population.

Overall, cities with the largest middle classes are more likely to be in the Midwest. Those with the biggest low-income populations are more often in the Southwest, particularly near the Mexico border. Metro areas with the highest proportions of upper-income households are more likely to be found in the Northeast or along the West Coast.

Even many of the cities with substantial middle-class populations are still under stress, according to Pew’s research. For example, Wausau, Wisconsin, and Youngstown-Warren, Ohio, are among the cities with the largest proportions of adults in middle-class homes, at 67.2 percent and 60.2 percent, respectively.

Yet median incomes have fallen sharply in both cities. They fell 8.5 percent in Wausau and 12.9 percent in Youngstown, Pew found. That compares with an 8 percent drop from 2000 to 2014 nationwide.

In addition, both cities have seen their lower-income population shares grow, while upper-incomes shrank. That suggests their middle classes have been bolstered by downward mobility, as some richer households fell into the middle, and middle-income earners fell into lower brackets.

In some cases, many former middle-class residents have moved up. In others, they have fallen lower.

For example, middle-class adults now constitute just 48.6 percent of the population in Boston, down from nearly 56 percent in 2000. Nearly the entire change reflects an increase in upper-income earners, which jumped 7 percentage points to nearly 30 percent. The lower-income proportion remained about 21.5 percent.

In Atlanta, the middle-income population has fallen to 50.5 percent of the total from 56 percent. There are fewer higher earners too: Their share fell about 1 percentage point to 22.6 percent. The gains occurred among lower-income adults, who jumped 7 points to 27 percent.

The national figures reflect a broad divide: More people moved up than down in 119 communities, Pew found, while the reverse was true in 110.