Republican Sen.-elect Joni Ernst easily won her race in Iowa last Tuesday, beating Democrat Bruce Braley by 8.5 percentage points. Her victory wasn’t shocking, but its size was (to everyone except pollster Ann Selzer, that is). The final FiveThirtyEight projection had Ernst winning by just 1.5 percentage points.

What the heck happened?

Here’s one explanation: White voters in Iowa without a college degree have shifted away from the Democratic Party. And if that shift persists, it could have a big effect on the presidential race in 2016, altering the White House math by eliminating the Democratic edge in the electoral college.

There are a lot of white voters in Iowa without a college degree, and they have differed politically from their demographic counterparts nationally. In 2008, President Obama won non-college whites in Iowa by 6 percentage points; he lost them nationally by 18 points. In 2012, college-educated and non-college-educated whites both broke by about 6 percentage points for Obama. That’s very different from nationwide, where Mitt Romney won non-college whites by 25 percentage points while winning college-educated whites by 14 points.

In the run-up to this year’s midterm elections, polls showed Iowa’s white voters behaving normally — well, normally abnormal — favoring the Democrat more than their demographic kin nationally. Last month, two Marist polls showed Braley trailing by 5 percentage points among Iowans with a college degree and down an average of just 1.5 points among those without a college education. Overall, Braley was down by only 2.5 percentage points, on average, in Marist’s October surveys.

According to the exit polls, however, Braley lost non-college-educated voters of all races by 10 percentage points. His performance among the college-educated matched pre-election polls. But among non-college whites, Braley lost by 14 points.

We can see this in the county-by-county returns. The biggest drop-off from Obama’s 2012 margin to Braley’s 2014 margin was in those counties that had a higher share of whites without a college degree. In those counties, every percentage point of additional non-college-educated voters meant a 0.3 percentage-point drop in Braley’s margin.

Now, if this were merely a problem with Braley, it wouldn’t be that big of a deal. But the shift in Iowa may be more fundamental than that — a problem for Democrats in 2016.

Obama saw a similarly distortional decline in his popularity among Iowans without a college degree over the past two years. His approval rating in Iowa used to run at or ahead of his national approval rating, but it hasn’t in his second term. Obama’s approval in Iowa this year has been just 38 percent, according to Gallup. His average approval rating nationally has been 42.3 percent.

In other words, we’re not just talking about Iowa shifting with the nation as a whole. Instead, the state’s relative political position has changed. Iowa has moved more against Obama than expected based on a uniform swing. And it goes beyond Obama. Gallup has been tracking the percentage of Iowans who identify as or lean Democratic over the past few years. This gets at the core of a people’s underlying political persuasion. We see a similar pattern to what was going on with Obama’s approval rating.

During Obama’s first term, the percentage of Iowans who considered themselves Democrats was 1 or 2 percentage points below the national average. It has dropped to about 5 points below that average in Obama’s second term.

It’s hard to overstate what this could mean going into 2016. In every presidential election since 1992, Iowa has been a swing state and yet a little more Democratic-leaning than the nation. But it’s been a very light blue state, helping to give Democrats an edge in the electoral college. In 2012, the states combining for 272 electoral votes were more Democratic than the nation. Using a uniform swing, Republicans would have needed to win the national popular vote that year by about 1.5 points to have won Colorado (the tipping-point state) and the electoral college.

When we take Iowa and its six electoral votes out of the Democratic column, the math changes: The Democratic edge in the electoral college virtually disappears. Only 266 electoral votes would be more Democratic than the nation. Republicans would have 259 electoral votes (including Iowa). The 13 electoral votes in Virginia, which was 0.03 percentage points more Democratic the nation as a whole in 2012, would be the deciders.

That, of course, does not mean that Republicans are going to win Iowa in 2016, let alone the presidency. We don’t know whom the nominees for either party will be. And the shift in Iowa could reverse itself.

Still, what happened in Iowa last Tuesday was probably not just because of midterm turnout (the Gallup numbers are from all adults), or a bad Democratic candidate, or a bad Democratic year. It was a reflection of the movement of the Iowa electorate over the past two years — specifically, movement of non-college-educated whites who shifted away from the Democratic Party. The gap in voting patterns between college-educated and non-college-educated whites in Iowa looks a lot more like the nation. That’s not good news for Democrats.

CORRECTION (Nov. 11, 2:48 p.m.): A previous version of this article incorrectly said that without Iowa, 267 electoral votes would be more Democratic than the nation. The correct number is 266.