The smart money was wrong. Trump pulled off a huge surprise victory, and he's the one heading to the White House.
So how did he do it? There's no big single factor in the exit polls that explains it. Instead it was a combination of many small victories.
In U.S. presidential politics, men tend to vote Republican and women tend to vote Democratic. Even in Barack Obama's resounding victory over Mitt Romney four years ago, Romney carried men by 52% to 45%, a seven-point margin. But Trump did better than that: He beat Clinton among men by nine points.
Clinton also fell short of President Obama's 2012 performance among women generally. Although Clinton was trying to become the first woman to win the White House, white women sided with Trump 53% to 42%. Among white women without college degrees - 17% of the electorate - she lost by 28 percentage points: 62% to 34%.
TINY GAINS AMONG AFRICAN-AMERICANS AND LATINOS
Black voters, who made up 12% of voters, backed Clinton over Trump by a margin of 11 to 1 -- but that wasn't as big as Obama's two landslides among African-American voters. He won the black vote by a margin of 15.5 to 1 in 2012, and 23.5 to 1 over John McCain in 2008. Plus, the African-American share of the electorate dropped to 12% this year, down from 13% in the two Obama victories.
Meawhile, after the harsh things Trump had to say about Mexicans, you wouldn't think too many Hispanic voters would back Trump. They made up 11% of voters and almost one-third of Latino voters voted for Trump. That's slightly better than Romney did with Latinos against Obama in 2012. That means that the slight rise in the Latino vote this year compared to 2012 was not the death knell for Trump that some experts predicted.
The share of white voters was 70%, down 2 percentage from 2012. They backed Trump at a slightly lower share - 58% to Mitt Romney's 59%.
NO MILLENNIAL FLOOD TO CLINTON
Trump got 35% of the vote from 18-to-24-year olds. That's just shy of the 36% Romney won in 2012. But Clinton did not do as well with that age group as Obama did. He won 60% of the youth vote -- and she won 56% of it.
Trump got majorities of voters who said they had a high school education or less and also those who attended some college: 51% and 52%, respectively. Mitt Romney lost both of those groups with 48% in 2012.
INDEPENDENTS BROKE FOR TRUMP
About a third of Americans don't call themselves either Democrats or Republicans -- and Trump beat Clinton among independents by six points, 48% to 42%. Additionally, the share of the electorate calling themselves independents crept up this year from 2012 (when Romney won them by five points), meaning Trump won a bigger slice of a bigger pie. Clinton did slightly better among Republicans than Obama did in 2012, but Trump did better among Democrats than Romney did that year.
ALL THE SINGLE LADIES
This was supposed to be the year never-married women would make the difference, and indeed single people (male and female) picked Clinton over Trump by 17 points. But they only made up 42% of the electorate. Trump carried married men by a whopping 21 points, which was enough to give him a solid majority among all married voters, male and female.
THE SWING STATES SWUNG BOTH WAYS
Trump captured quite a few swing states, including the big prizes of Florida and Ohio. But he also won in places which didn't look like swing states until Election Day. That includes Pennsylvania and Wisconsin, which were supposed to be part of Clinton's "Blue Wall." She won Virginia, Colorado and Nevada, but in the end, the biggest swing states swung for Trump.