A populist wave that began with Brexit in June reached the United States in stunning fashion on Tuesday night. In one of the biggest upsets in American political history, Donald Trump won a truly historic victory in the U.S. presidential election.

Trump’s remarkably decisive win stunned most political pundits, myself included. Throughout the campaign, Trump seemed to have a polling ceiling of about 44 percent and he consistently had the highest unfavorability rating of any major party nominee in history. Accordingly, months ago I predicted that Clinton would easily beat Trump.

Then, at the beginning of October, the uproar over Trump’s lewd and offensive remarks on the “Access Hollywood” videotape, combined with the escalating number of women who accused Trump of sexual assault, seemed to finish off his campaign. Right up until Tuesday afternoon, therefore, a comfortable victory for Clinton seemed like a foregone conclusion.

But I was dead wrong. Trump won a sweeping victory in the presidential race. His night began with critical victories in Florida, North Carolina and Ohio, three states essential to his path to 270 electoral votes. As the night wore on, Clinton’s “blue wall” collapsed amid a red tide that swept across the country from the Atlantic coast to the Rocky Mountains. The blue states of Pennsylvania, Michigan, Wisconsin and Iowa fell to Trump like dominoes. The election returns made clear that Trump would carry over 300 electoral votes, more than enough to win the presidency.

It’s extremely early to draw conclusions about the 2016 election results, but here are five factors that at least partially explain what happened.