– President-elect Donald Trump nearly shattered Minnesota’s long record of picking Democrats for president on Election Day largely on the strength of rural voters, a growing divide with lasting consequences for the state’s political traditions.

“Trump is our opportunity to wake up,” said Ed Rush, a telecommunications technician who lives outside Pierz, a small town between St. Cloud and Brainerd. Trump racked up more than three times as many votes as Clinton here in Morrison County.

Rush, 56, said he didn’t vote in the past two presidential elections. But he got intrigued when he saw much of the Republican establishment distance itself from Trump. “This guy is outside the box,” said the father of three, whose front yard is home to an old white bus with “Trump” hand-painted on its side.

Democrat Hillary Clinton eked out a victory in Minnesota on her way to defeat nationwide, topping Trump by just 42,947 votes in uncertified returns. That’s out of nearly 2.7 million votes cast for the two major-party candidates in the state. She carried Minnesota despite winning only nine, mostly population-heavy counties out of a total of 87. This geographical sorting, evident in other recent elections, is increasingly making the DFL the party of the Twin Cities while the GOP strengthens its hold on much of the rest of the state.

“What at first felt like an anomaly became more like a current by the time Election Day arrived,” said Rep. Jeanne Poppe, DFL-Austin, who clung to her Mower County House seat even as the county flipped from Obama to Trump. “It got to a point late in the campaign where it became rare for me to find people who admitted to supporting Clinton, especially men. It was like they didn’t want their neighbors to know.”

Poppe, a counselor by trade, said in her experience many rural voters feel, fairly or not, that they are ignored by political leaders.

“I think we have to go back to asking what is causing this anger, anxiety and frustration,” she said. “Whatever it is, it’s a deep-seated emotion that was finally given an opportunity to rise up.”

Ricky Tautges, 42, said he voted for Obama in the last election. But this year, he said he worried that a Clinton presidency would threaten his Second Amendment rights and keep upward pressure on the health insurance premiums he pays as a farmer and co-op worker.

Sipping a Busch Light with other hunters inside Patrick’s Bar and Grill, Tautges said he had concerns about Trump. “But he’s better than our other choices.”

Mark Fyten, who co-hosts a morning radio show on KLTF in nearby Little Falls, said key social and fiscal issues have concerned callers and people who talk to him privately. Many are worried the country has tilted too far left on such issues as abortion and same-sex marriage. Once gay marriage became legal, he said, people accepted it, but they bristled at instances when bakery owners felt like they were being forced to bake cakes for same-sex weddings, for instance.

“I think there’s a sense that Washington has disconnected itself from people out here in rural areas,” Fyten said.

People were “tired of not being listened to,” Fyten said. So with Trump, people were “willing to overlook his foibles as a human being because they just couldn’t consider the alternative.”

Six of the nine counties that Clinton won are among the state’s 10 most populous: Hennepin, Ramsey, Dakota, Washington, Olmsted and St. Louis. The other three — Cook, Carlton and Lake — are small counties in reliably DFL northeastern Minnesota.

That’s a huge fall from Obama’s winning margins in Minnesota. In all, 19 Minnesota counties that went for Obama in 2012 and 2008 opted for Trump this time. In addition, there are another 14 counties that went for Obama in ’08 but then swung to Romney four years ago. In other words, in the span of eight years, a total of 33 out of 87 counties swung from Democratic to Republican in the presidential race.

The counties that went for Trump are generally the whitest, least educated and lowest income parts of the state.

Counties that supported Trump, on average, lagged Clinton counties by 17 percent in the share of residents with a bachelor’s degree or higher. The counties that gave Trump his best margins — 70 percent or higher — are all below the state’s overall median of $63,000.

The state’s two wealthiest counties, Carver and Scott, also went for Trump — but at considerably lower margins. In fact, they were the only two counties in the state where the share of Republican voters declined since 2012.

Notably, three of the heavily populated counties that went for Clinton — Dakota, Washington and Olmsted — have become less Republican over time; all three backed George W. Bush for president in 2000 and 2004.

Republicans have been able to maximize those geographic splits in the last two elections to grow the number of state legislative seats they hold, leaving DFLers struggling at the State Capitol. But the greater trend — populous counties getting more Democratic, sparse counties getting more Republican — is an ongoing and major challenge for the Minnesota GOP in its ability to win statewide races.

To that end, the biggest swings this time around were in some of the state’s smallest counties — Chippewa, Lac qui Parle, Swift and Traverse, all along the state’s western edge. Obama narrowly won all four of those counties in 2012, with less than a 10 percent margin in each case. This year, all four saw about 60 percent of voters choose Trump, with margins at or above 25 percentage points.

Clinton improved on Obama’s winning margin in only a single county, Hennepin.

On Wednesday, Minnesota Secretary of State Steve Simon pegged voter turnout this year at 74 percent, likely to again be among the highest in the nation. Democratic candidates tend to do better when turnout is higher, and another reason for Trump’s wide geographic gains is that this year’s turnout percentage is less than in both 2012 and 2008.

Trump did only a small fraction better in Minnesota this year than Romney did four years ago, outpacing him by just 789 votes in all. But Obama greatly outperformed Clinton, racking up more than 180,000 more votes than she did.

Some Trump supporters in Pierz acknowledged that Trump may not accomplish much of what he’s proposed. “If he can do 10 percent of what he says,” Rush said, “I’ll be totally happy.”