Across the country Tuesday, rural white voters flocked to the polls and upended expectations of a comfortable Hillary Clinton victory.

While Boston-area residents tend to think of New England as immune to such inurbane uprisings, that’s a fantasy that fades quickly once you travel north of Portsmouth, N.H. While rural residents account for just around 10 percent of Massachusetts, Rhode Island, and Connecticut, they account for 40 percent of the New Hampshire population, and 60 percent in both Maine and Vermont.

That difference was exposed in full force as voters alienated from city life crashed the Democrats’ party on election day. The myth of a solid-blue New England was shattered by disgruntled voters from the northern hinterlands.

“Democrats have paid a steep price for ignoring rural/exurban voters for too long, and it has bitten them hard tonight,” veteran Democratic strategist Matt L. Barron of Williamsburg, Mass., told me late Tuesday night. Barron, who goes by the handle @MrRural on Twitter, has for years preached the importance of appealing to those voters.

So, while southern New England handily dispatched Donald Trump as expected, something else was happening up in those heavily rural states. Not all of it can be pinned on the rural-urban divide, to be sure. But it looks like a strong contributing factor.

New Hampshire was too close to call late into Tuesday night—literally within 15 votes past midnight. While Maine appeared to be trending very slightly in Clinton’s favor, Trump was poised to win at least one electoral college vote there—potentially his presidency-clinching 270th. That’s because, in addition to two electoral votes for winning the state, Maine awards one for winning each congressional district. Trump had the more rural 2nd district well in hand.

As was the case around the country, in northern New England it wasn’t just the presidential race being tipped in Republicans’ favor.

New Hampshire and Vermont both elected Republican governors—Chris Sununu and Phil Scott, respectively—to replace departing Democratic ones. Freshman Republican Rep. Bruce Poliquin, of Maine’s 2nd district, won re-election handily when many expected him to lose in the presidential-year turnout. New Hampshire’s Republican U.S. Sen. Kelly Ayotte was locked in a neck-and-neck race to stave off a mighty challenge from Gov. Maggie Hassan (and to prevent Maine’s Susan Collins from becoming the lone GOP Senator from the region). Scandal-plagued New Hampshire Republican Frank Guinta, presumed to be a dead duck against repeat challenger Carol Shea-Porter, was in a too-close-to-call battle well into the wee hours. Even Democratic incumbent Ann Kuster of New Hampshire barely survived to serve another term.

The issues should be in Democrats’ favor, Barron says. But, the party targets its messages—both in substance and distribution methods—toward its city-dwelling, college-educated base. On Tuesday, Barron says, that contributed not only to Clinton’s problem in rural Wisconsin, North Carolina, Arizona, and elsewhere, but to the Democratic Senate campaigns in those states as well.

Democrats need “some basic electoral infrastructure,” Barron says, “that is focused on messaging and outreach to the Trump constituency, many of which once supported Democratic candidates like [former Rep.] Mike Michaud of Maine.”

It almost makes you wonder how the election might have gone had the Democrats nominated someone from those northern New England rural states … say, the junior senator from Vermont, Bernie Sanders.