Both Bernie Sanders and Donald Trump are blaming free-trade deals for the decline of working-class jobs and incomes. Are they right?

Clearly, America has lost a significant number of factory jobs over the last three decades. In 1980, 1 in 5 Americans worked in manufacturing. Now it’s 1 in 12.

Today Ohio has a third fewer manufacturing jobs than it had in 2000. Michigan is down 32 percent.

Trade isn’t the only culprit. Technological change has also played a part.

When I visit one of America’s remaining factories, I rarely see assembly-line workers. I don’t see many workers at all. Instead, I find a handful of technicians sitting behind computer screens. They’re linked to fleets of robots and computerized machine tools who do the physical work.

There’s a lively debate among researchers as to whether trade or technology is more responsible for the decline in factory jobs. In reality the two can’t be separated.

Were it not for technological breakthroughs we wouldn’t have the huge cargo containers, massive container ports and cranes, and satellite and Internet communications systems that have created highly-efficiently worldwide manufacturing systems.

These systems have relocated factory jobs from the United States to Asia, especially to China. Researchers find the biggest losses in American manufacturing started in 2001 when China joined the World Trade Organization, requiring the U.S. to lower tariffs on Chinese goods.

MIT economist David Autor and two co-authors estimate that between 2000 and 2007 the United States lost close to a million manufacturing jobs to China – about a quarter of the total decline in those years. Robert Scott of the Economic Policy Institute puts the loss since then at about 3 million.

This doesn’t mean free trade has been entirely bad for Americans. It’s given us access to cheaper goods, saving the typical American thousands of dollars a year.

A recent study by economists at UCLA and Columbia University found that trade has increased the real incomes of the U.S. middle class by 29 percent, and even more for those with lower incomes.

But trade has widened inequality and imposed a particular burden on America’s blue-collar workers.

If you’re well educated, free trade has given you better access worldwide markets for your skills and insights – resulting directly or indirectly in higher pay.

On the other hand, if you’re not well educated, the trade deals of the last quarter century have very likely taken away the factory job you (or your parents or grandparents) once relied on for steady work with good pay and generous benefits.

These jobs were the backbone of the old American middle class. Now they’re almost all gone, replaced by lower-paying service jobs in places like retail stores, restaurants, hotels, and hospitals.

The change has been a dramatic. A half century ago America’s largest private-sector employer was General Motors, whose full-time workers earned an average hourly income (including health and pension benefits) of around $50, in today’s dollars.

Today America’s largest employer is Walmart, whose typical employee earns just over $9 an hour. A third of Walmart’s employees work less than 28 hours per week and don’t even qualify for benefits.

The core problem isn’t really free trade, or even the loss of factory jobs per se. It’s the demise of an entire economic system in which people with only high-school degrees, or less, could count on good and secure jobs.

That old system included strong unions, CEOs with responsibilities to their employees and communities and not just to shareholders, and a financial sector that didn’t demand the highest possible returns every quarter.

Trade has contributed to the loss of this old system, but that doesn’t necessarily mean we should give up on free trade. We should create a new system, in which a greater share of Americans can be winners.

But will we? The underlying political question is whether the winners from America’s current economic system – people with college degrees, the right connections, and good jobs that put them on the winning side of the divide – will support new rules that widen the circle of prosperity to include those who have been on the losing side.

Those new rules might include, for example, a much larger Earned Income Tax Credit (effectively, a wage subsidy for lower-income workers), stronger unions in the service sector, world-class education for all (including free public higher education), a single-payer healthcare plan, more generous Social Security, and higher taxes on the wealthy to pay for all this.

If the winners refuse to budge, America could turn its back on free trade – and much else. Indeed, there’s no telling where the anger we’ve seen this primary might lead.