Historians will be debating what happened on Tuesday for decades—centuries, perhaps. But there are some assertions that we can already make. The polls were wrong, for one thing: on average, going into Election Day, they had predicted that Hillary Clinton would win the popular vote by about four per cent. The early voting analyses were wrong, too: most of them said that Trump was too far behind in Florida to win that pivotal state. And journalists (myself included) were wrong: we mistakenly trusted the polls instead of what we saw before our eyes—huge crowds turning out for Donald Trump at rallies all over the country. The Clinton campaign, which as late as Monday evening was expressing a high degree of confidence, was also wrong.

Meanwhile, Trump, I hate to say it, was right: he achieved the Brexit-style upset he had promised, riding a surge of turnout among white working-class voters to carry the key southern states of Florida and North Carolina, put a scare into the Clinton campaign in Virginia, and then stormed across the Midwest and the Rust Belt, breaking through Clinton's so-called "blue wall," and picking up Iowa, Ohio, Pennsylvania, Wisconsin, and perhaps Michigan, which, as of early Wednesday morning, still hadn't been officially called. Trump appeared to be heading for more than three hundred votes in the Electoral College.

I should note here that, with many votes on the West Coast still to be counted, it is still possible that Clinton will wind up the winner of the popular vote. According to the New York Times’s live forecast, which incorporates the latest voting numbers, her margin of victory will be somewhere around one per cent. But in the Electoral College, which doesn't apportion votes directly in proportion to population, big Democratic states like California, Illinois, and New York get a raw deal. According to some estimates, Democrats need a two-point victory, or thereabouts, to reach two hundred and seventy votes in the Electoral College. In this case, as it was in 2000, that handicap was too large to overcome.

Pending a fuller analysis of the voter returns, any conclusions must be preliminary, but at least five other factors seem to have been key to Trump's victory in the Electoral College.

First, despite all the talk of his lack of campaign organization, Trump’s base of white working-class voters turned out in large numbers. This trend, first visible in western and northern Florida, extended all the way up the East Coast and then spread across the Midwest. The Times’s Nate Cohn and his colleagues were among the first to point to this trend. Early on, Cohn said that the votes Trump was stacking up in Florida counties with a lot of white voters could be enough to fend off the expected late surge of Clinton voters from Palm Beach, Broward, and Miami-Dade counties, and that these numbers would have implications in other parts of the country, too. So it proved.

According to the network exit poll, Trump carried white voters who don't have a college degree by a huge margin: sixty-seven per cent to twenty-eight per cent. Since these voters still make up about forty per cent of the over-all electorate, they gave Trump a very solid base. Their support enabled him to make progress in lower-income white Democratic areas, of which, until yesterday, there were still many, such as Lackawanna County, Pennsylvania, where I watched Trump speak on Monday night. In 2012, President Obama carried Lackawanna County by twenty-seven percentage points. On Tuesday, Clinton won it by just three and a half points. That was a stunning shift.

Second, Trump appears to have done better than expected among college-educated white voters. Going into Election Day, the Democrats had been confident that they would carry this group for the first time in decades. According to the network exit poll, though, this group voted for Trump, forty-nine per cent to forty-five per cent. In Pennsylvania, which both sides regarded as a crucial state, the effect could be seen in some of the affluent areas surrounding Philadelphia, which the Clinton campaign had been hoping to carry by big margins. In Bucks County, for example, Clinton beat Trump by just 0.6 percentage points, a smaller margin than President Obama achieved over Romney, in 2012.

The third factor was that, in some parts of the country, Clinton failed to rack up the margins of victory she needed among minority voters and the young. Take African-American voters: according to the network exit poll, Clinton got eighty-eight per cent of the black vote. That was obviously a strong performance, but in 2012 Obama got ninety-three per cent. Perhaps more surprising, given Trump's comments about immigrants, he appears to have fared better than Romney did with Latino voters. The exit poll indicated that sixty-five per cent of Latinos supported Clinton, while twenty-nine per cent voted for Trump. In 2012, Obama got seventy-one per cent of the Latino vote, and Romney got twenty-seven per cent.

Among young voters, too, the Democratic candidate saw a drop-off compared to 2012, when Obama secured sixty per cent of the vote from people between the ages of eighteen and twenty-nine. On Tuesday, Clinton got fifty-four per cent of this group. In a tight election, which this one was, such changes can make all the difference.

Fourth, and this cannot be avoided, men were primarily responsible for Trump's triumph. Over all, according to the exit poll, women voted for Clinton by a margin of twelve percentage points, fifty-four per cent to forty-two per cent. Men voted for Trump by the same twelve-point margin, fifty-three per cent to forty-one per cent. The exit polls don't explain this split—but sexism surely played some role.

And yet race and class do seem to have trumped (pardon the pun) gender. White women without college degrees, who make up about seventeen per cent of the voting-age population, voted for Trump over Clinton by a whopping twenty-eight-point margin, sixty-two per cent to thirty-four per cent. If the members of this group had split their votes fifty-fifty, say, they would have delivered a victory to Clinton. But, to a large extent, they voted with their male peers.

Finally, and this shouldn't be ignored either, the relatively well-to-do went for Trump. According to the exit-poll figures, people who earn less than fifty thousand dollars a year—who make up a bit more than a third of the population—voted for Clinton over Trump by a margin of about eleven points, fifty-two per cent to forty-one per cent. The roughly two-thirds of the population who earn more than fifty thousand dollars a year voted for Trump. The margin was considerably smaller, but because there are a lot more of these voters their numbers were enough to pull the Republican tycoon to victory.

How can this finding be reconciled with the thesis that the white working class was the driver of Trump's victory? A large part of the answer is that a lot of white voters without college degrees earn more than fifty thousand dollars a year. The lowest-paid voters tend to be younger people and minorities, and they went for Clinton. In that sense, she won the working-class vote.

To be sure, these are just polling numbers, and pollsters had a horrible night on Tuesday. The network exit poll, however, is a huge exercise, in which several thousand researchers question tens of thousands of actual voters outside voting places all across the country. It is generally thought to be much more reliable than preëlection polls—but it did turn up some oddities, particularly in regard to people's attitudes toward Trump.

Just thirty-seven per cent of respondents to the exit poll said that Trump was qualified to be President; sixty-one per cent said that he was unqualified. In addition, only thirty-four per cent of the respondents said that he had the right personality and temperament to be President, and seventy per cent said they were bothered by his offensive remarks about women. According to these metrics, at least, Clinton's numbers were much better. Fifty-three per cent of respondents said that she was qualified to be President, and fifty-six per cent said that she had the right personality and temperament for the job.

And yet, on January 20, 2017, it will be Trump who will be inaugurated as President. Go figure.

More on Donald Trump’s victory: David Remnick on an American tragedy, Amy Davidson on Trump’s stunning win, Evan Osnos on Trump’s supporters, and Adam Gopnik on talking to kids about Trump’s victory.