The 2016 campaign ended with a surprising and inconclusive outcome: Hillary Clinton won the popular vote comfortably but lost the Electoral College to Donald Trump. We identify three factors that help explain this outcome. First, fundamental economic and political trends favored a Democratic popular vote win. Second, the party coalitions had become more polarized by race and education during Obama’s presidency. Third, Trump’s focus on issues connected to ethnic and social identities made attitudes toward immigration and African-Americans more important in voters’ choices in 2016 than they had been in 2012.