When Robert Zimmerman grew up in Hibbing, Minn., the area’s politics were as deep blue as the waters of Lake Superior to the east. The nearby taconite mines churned out iron ore, and the miners re-elected left-leaning congressmen like clockwork.

Zimmerman grew up and left his hometown (and his name) behind to become Bob Dylan. And at a time of dramatic political change, he wrote his most famous lyric: “The times they are a-changin’.”

As President Donald Trump rumbled into Minnesota for a rally on Thursday night, those words again applied to Dylan’s home state. Republicans have long seen Minnesota as a key target. Trump nearly won the state in 2016 and would have been the first Republican to do so since Richard Nixon.

But Trump’s endless scandals, his bullying brand of politics and his trade-war folly are giving Democrats a political gift in this swing state that Republicans need to win in the November midterms.

Because of former U.S. Sen. Al Franken’s resignation in January, Minnesota has two senators on the ballot this year. Both are Democratic ncumbents. But what’s astonishing is the fact that four of Minnesota’s eight congressional districts are competitive. Two red seats are likely to turn blue, but two blue seats could turn red — a tectonic shift triggered by Trump that demonstrates how he has redrawn conventional political lines.

Around Hibbing, in Minnesota’s Eighth Congressional District, Republicans have one of their best opportunities to flip a Democratic seat. Many mines have gone dormant. The Main Streets of Virginia, Eveleth and Aurora used to be thriving; now the median age in the district has skyrocketed and the bustle has turned to bust.

The region is dotted with shuttered storefronts, antique shops and dive bars. And for those who feel nostalgia for the boom times, the notion that Trump could make Minnesota’s Iron Range Great Again — with a Hail Mary trade war — is alluring. Everything else failed. Why not give Trump a shot? The race for the Eighth District House seat is considered a tossup.

But as the trade war giveth, it also taketh away. For his rally Thursday, Trump was coming to Rochester, the economic anchor of the First Congressional District. The incumbent vacating the seat, Tim Walz, is a Democrat now running for governor. But with the seat open, the district’s fundamentals favor Republicans: The district is largely rural, 90 percent white and comparatively affluent (partly thanks to the 35,000 employees of the world-renowned Mayo Clinic health care hub in Rochester).

Even so, Trump has given Democrats better odds. His health care proposal was opposed by the medical community. High education levels in the district favor Democrats, too, as college-educated white people tend to have negative opinions of Trump.

Even more striking are the political shifts underway among farmers in the district, as Trump’s quixotic trade war begins to tilt soybean farmers along the Iowa border against Trump.

“The trade war is really doing long-term damage to our farmers out here,” Gary Wertish, president of the Minnesota Farmers Union, recently told me. “Soybeans is the big one — the price has fallen approximately a couple of dollars a bushel; it’s been about a 20 to 25 percent reduction since Trump started the trade war with China.” Worse, the steel tariffs (that miners in Minnesota’s Eighth Congressional District are celebrating) are hitting farmers hard in equipment purchasing and repairs.

As Wertish put it: “Farmers are getting squeezed on both ends.”

Trump’s cynical attempt to provide a one-time payment to farmers isn’t cutting it, either. “The amount of money that they’re proposing is not even close to what the tariff wars have cost farmers,” Wertish added. He worries that the export markets that Minnesota’s farmers have cultivated for decades could disappear permanently, even if the trade war ends soon. And Wertish warns that family farmers and younger farmers may be forced out of agriculture — even after they “get their crop in the bin” — if they can’t pay their bills because of Trump’s trade war.

As a result, a district that would normally favor Republicans in this cycle is now a tossup. Trump may have thrown away an easy GOP pickup.

At the same time, Trump has given Democrats a huge political gift in the suburbs of Minneapolis and St. Paul, particularly in the Republican-held Second and Third Congressional Districts. Because of Trump, “the Twin Cities and the suburbs are boiling over with progressive energy,” according to Jeff Blodgett, a leading Democratic-Farmer-Labor strategist. “The changing politics of the suburbs is going to dominate what happens here in 2018 and beyond.”

Trump has alienated huge swaths of historically Republican voters in each district. Both the Second District and the Third District are now considered “lean Democratic” by the Cook Political Report.

Trump fires up the crowds at his rallies, but his Minnesota foray will certainly fire up Democrats in the suburbs. If energized Democrats manage to win two longtime Republican suburban strongholds and can hang on in the rural First District and the Eighth District, they will make serious headway on the path to taking back control of the House.

Of course, a lot can happen between now and November. As Dylan reminds us: “And don’t speak too soon / For the wheel’s still in spin / and there’s no tellin’ who that it’s namin’ / For the loser now will be later to win / For the times they are a-changin’.”

Brian Klaas is an assistant professor of global politics at University College London. He is the co-author of “How to Rig an Election” and the author of “The Despot’s Apprentice” and “The Despot’s Accomplice.” He wrote this for the Washington Post.