Democratic presidential hopefuls Hillary Clinton and Bernie Sanders debated in Flint, Michigan, Sunday night, sparring in a city that gained national attention after it was discovered that its residents were drinking toxic tap water.

Yet the two differed little in how they might address the fact that Flint’s children have tested positive for dangerous levels of lead. Instead, what the former secretary of state and the socialist Vermont senator parried over most was another topic with special significance to Flint residents: trade policy.

“Secretary Clinton supported virtually every one of the disastrous trade agreements written by corporate America,” Sanders said in one of his most direct attacks on Clinton yet. “I was on a picket line in early 1990s against Nafta because you didn't need a Ph.D. in economics to understand that American workers should not be forced to compete against people in Mexico making 25 cents an hour.”

Sanders has cited research from the labor-backed Economic Policy Institute showing that more than 700,000 jobs have been lost in the wake of Nafta, the North American Free Trade Agreement.

Clinton, who supported Nafta during her husband Bill Clinton’s administration in the 1990s, countered that she had voted against a similar trade deal with Central America. After speaking positively about the Trans-Pacific Partnership as secretary of state, Clinton now opposes the proposed trade deal.

The two Democratic hopefuls’ back-and-forth on trade policy illuminates wider themes of the 2016 election season, in which populist messages geared toward working-class audiences have aroused passions in both parties. Republican front-runner and reality TV star Donald Trump has won substantial blue-state support on the message that China is “killing” the U.S. in manufacturing, laying the blame on American policymakers.

Whatever one's viewpoint, it's clear that free trade policies have weighed heaviest on the once-proud blue-collar worker, while the benefits have accrued to consumers and high-skilled workers with college degrees — not to mention the multinational corporations that have saved billions of dollars in manufacturing costs.

Sanders and his allies hang their critique of trade policy on the notion that the economic ruin of rust-belt cities stemmed largely from the lifting of trade barriers with Mexico, China and other nations.

“We passed Nafta and other disastrous trade agreements, which had a horrendous impact on African-Americans in particular, in Flint, in Detroit and all across this country,” Sanders said Sunday.

So what did the years after Nafta look like from the vantage point of a Flint auto worker?

By all accounts, not good. Even if he or she wasn’t one of the 40,000 Flint factory workers to lose their jobs in the past two decades, the Flint auto worker would have seen wages stagnate or decline as factories were shuttered and opportunities dried up.

“Auto industry employment in the Flint area is only a shadow of what it once was,” said Charles Ballard, a professor of economics at Michigan State University.

Manufacturing employment in Flint fell from more than 55,000 in 1990 to just over 12,000 today. Though the decline followed a broader, decades-long drop in factory jobs across the U.S., Ballard said, Michigan’s loss of manufacturing employment has been particularly acute.

Some economists point to the 1994 passage of Nafta as a crucial facet in that picture. “Nafta is very much a piece of the Michigan job loss story,” said Timothy Wise, director of research and policy at the Global Development and Environment Institute at Tufts University.

The accord, which leveled existing trade barriers between the U.S., Mexico and Canada, helped companies to shift production from states where unions ensured above-average hourly earnings to low-cost Mexico. In the late 1990s, for instance, General Motors moved steering-wheel production from a Flint factory where workers earned $22 an hour to Matamoros, Mexico, where laborers made between $1 and $2 an hour.

“There was an explicit incentive to move auto jobs to Mexico,” said Wise, who noted that as jobs move south, wages back home followed. “Auto unions saw their bargaining power reduced and started to make concessions.”

The total number of manufacturing workers lost to trade, however, is murky. “It’s a very hard number to pin down,” Wise said. Recent estimates of employment lost to China have become clearer in recent years, though, with research that shows as many as 2 million manufacturing jobs flowing to China since 2000.

But that’s not the whole picture. “The story was that GM, Ford and Chrysler got lazy,” said Ballard. The Big Three earned huge profits throughout a mid-20th century largely free of foreign competition. When Honda and Toyota entered the picture, the Detroit auto industry was caught flat-footed, Ballard said.

“If we had walled off the U.S. and not accepted imports from other countries, that doesn’t mean there wouldn’t have been any competition,” Ballard explained.

Similarly, the broader decline of American manufacturing jobs, which preceded major trade agreements, has stemmed from a variety of factors, said Gary Hufbauer, a senior fellow at the Peterson Institute of International Economics. One of the chief proponents of Nafta in the early 1990s, Hufbauer rejects the job-loss numbers promoted by Sanders.

The bleak analysis offered by Sanders puts "120 percent of the blame" for job losses on trade, Hufbauer said. In seriousness, he estimated that as little as 20 percent of the decline in manufacturing employment might be attributable to trade deals. “It’s not the principal reason Michigan and Flint are in hard times right now.”

To Hufbauer, the more important factor is automation. “An awful lot of work in the assembly plants has been taken over by robots,” he said, noting the sharp decline in the number of workers per 1,000 cars produced in the U.S. As Vox’s Matthew Yglesias pointed out, manufacturing output has risen even as manufacturing jobs have vanished.

But like the aggregate effects of trade, it’s hard to separate the precise impacts of automation on the workforce. In a post last year, two Brookings Institution researchers found that there was no relationship across countries between increasing automation and declining manufacturing employment, with Germany serving a prime example.

It’s not just jobs, of course, that are affected by trade policies.

Even as trade deficits have opened up between the U.S. and the rest of the world, pulling manufacturing jobs overseas, “that arithmetic doesn’t look at the other side of the coin,” Hufbauer said. Anyone who owns a smartphone has directly benefited from supply chains that reside largely in low-wage manufacturing centers like China.

And recent research has shown that it’s the lowest-income consumers who benefit most from cheaper goods made overseas. A 2015 study out of UCLA and Columbia University showed that the lowest 10 percent of wage earners saw a 63 percent boost in buying power from trade, compared with just a 28 percent lift for the richest 10 percent.

Meanwhile, incomes for higher wage-earners have increased in the years since trade liberalization, particularly in the information-technology and financial-services sectors. 

“The great debate in trade policy is whether that’s a good tradeoff,” said Wise.

Whoever takes the White House in 2017 will face that question. President Barack Obama has spent the past year pushing hard for the Trans-Pacific Partnership, which would join 40 percent of the world economy in an unprecedented trade agreement.

Sanders has opposed that proposal from the start. Clinton called it a “gold standard in trade agreements to open free, transparent, fair trade” as secretary of state in 2012, but has since come out against the deal.

Most economists, meanwhile, regard the march to reduced trade barriers the world over as inevitable, casting opposition to trade liberalization as 1920s-style protectionism. But as the experience in Flint and elsewhere shows, broad economic theory doesn’t always account for the messy realities on the ground.

“Economics basically says, ‘Give up on managing your integration with the global economy. Just let the market do its magic,’” said Wise. “But the market’s magic doesn’t work very well for working people.”