No Democratic presidential candidate had campaigned in Traverse City, Mich., in decades until Senator Bernie Sanders pulled up to the concert hall near the Sears store on Friday. Some 2,000 people mobbed him when he arrived, roaring in approval as he called the country’s trade policies, and Hillary Clinton’s support for them, “disastrous.”

“If the people of Michigan want to make a decision about which candidate stood with workers against corporate America and against these disastrous trade agreements, that candidate is Bernie Sanders,” Mr. Sanders said in Traverse City, about 250 miles north of Detroit.

Mr. Sanders pulled off a startling upset in Michigan on Tuesday by traveling to communities far from Detroit and by hammering Mrs. Clinton on an issue that resonated in this still-struggling state: her past support for trade deals that workers here believe robbed them of manufacturing jobs. Almost three-fifths of voters said that trade with other countries was more likely to take away jobs, according to exit polls by Edison Research, and those voters favored Mr. Sanders by a margin of more than 10 points.

For Mrs. Clinton, it was a stinging defeat in a state that she had made a symbol of her campaign, pledging to help the citizens of Flint overcome its contaminated water crisis in a rare display of passion and outrage from a candidate who is often reserved. The results were also a reminder of her weakness among two key voting blocs: working-class white men and independent voters.