Image copyright Getty Images Image caption Bernie Sanders at a campaign event with United Steelworkers Local 310L

Bernie Sanders pulled off a surprise upset of Hillary Clinton in the Michigan primary. What does this say about Americans' attitudes toward trade in the so-called Rust Belt states?

Going into primary day in Michigan, Democratic campaign consultant Joe DiSano was so confident that Hillary Clinton would win - as were all the polls - that he nearly voted for a Republican.

In the Michigan primary, voters can request either party ballot on election day, allowing them to cast their vote regardless of party affiliation. In past years when the Democratic nomination was all but certain, DiSano has used his vote to try to meddle with the outcome of the Republican nomination.

But on Tuesday morning, he got a bad feeling and decided not to play games - he voted for Clinton.

It turned out his bad feeling was right. Senator Bernie Sanders pulled off a victory that the analytics website FiveThirtyEight called "one of the greatest upsets in modern political history".

One possible reason: trade and jobs. According to the Washington Post, "Fifty-eight percent of Democratic voters said that trade 'takes away U.S. jobs', and 56% of them voted for Sanders".

If true, that would not bode well for Clinton in other states that were once hubs of American manufacturing - the so-called "Rust Belt" states, which includes Ohio, Indiana, Illinois and Pennsylvania.

"Historically, Michigan and the surrounding states built cars, and free trade policies contributed to the destruction of America's manufacturing base," says DiSano. "The result is you have a generation of people who have had stagnant incomes and are having a real tough time in retirement, preparing for retirement and finding jobs. That's resulted in a rage among people that has been building for 35 years."

Image copyright Getty Images Image caption Clinton speaks on the floor of a Detroit manufacturing plant

Sanders appealed to that simmering rage when he answered a question during the 6 March Democratic debate in Flint, Michigan, from a factory worker who could not find employment.

"Secretary Clinton supported virtually every one of the disastrous trade agreements written by corporate America," Sanders said. "Nafta, supported by the Secretary, cost us 800,000 jobs nationwide, tens of thousands of jobs in the Midwest. Permanent normal trade relations with China cost us millions of jobs."

The North American Free Trade Agreement, or Nafta, was one of the signature deals of Bill Clinton's presidency in the 1990s, and eliminated many tariffs on goods traded between the US, Canada and Mexico. As First Lady, Hillary Clinton was supportive of the deal, though she has since changed stance.

Many strongly believe Nafta has drained up to 1m jobs from US manufacturing by incentivising companies to move factories to Mexico, where the labour is cheaper. There is plenty of debate about whether or not Nafta truly caused the bottom to fall out of labour, but Edward Alden, a senior fellow at the Counsel on Foreign Relations, says that's not even the point anymore.

"I honestly think Nafta at this point is almost symbolic," he says. "It was the first big US trade agreement with a country where wages were much lower.

Image copyright Getty Images

The beginning of the decline of American manufacturing began decades before Nafta, and Alden says that factors like better technology and the Great Recession have contributed in addition to the rise of globalisation.

But candidates like Sanders and Donald Trump have capitalised on the desire to clamp down on trade deals that favour the exodus of American jobs, though they offer dramatically different perspectives on solutions. Martha Bayne, editor in chief of Belt Magazine, says that coastal pundits underestimated the success of that kind of populism going into Midwestern primaries.

"Everything becomes about the bottom line. Everything in the Rust Belt on the policy level seems to be about economic recovery," she says. "It impacts education, it impact health, all these other things...I think that that's why trade specifically and the loss of jobs overseas has become such a focal point - it speaks to everything else."

Image copyright Getty Images Image caption Ford factory workers in Detroit in 1930

So, could a President Trump or Sanders really resurrect manufacturing by, say, rejecting the Trans-Pacific Partnership?

Alden says nothing is going to bring back the halcyon days of manufacturing, but that the president does have a great deal of power when it comes to trade deals and tariffs, and there is lots at stake for the US as it tries to forge a new trade agreement with Japan with the TPP.

He also argues there are lots of ways beyond trade that the government could help middle class workers, but that hasn't happened. For that, he blames both parties.

"We have one of the weakest social safety nets in the developed world, our education system is losing ground and failing to train people for the jobs of the future, we're not investing in modern infrastructure," he says. "We're doing none of these things, then Washington is surprised when voters in the Rust Belt states are unhappy.

"They have a right to be unhappy, because they've been failed by their political leaders."