Two Americas collided in the presidential race and the side that was genuinely passionate about its champion walked away the narrow winner.

Donald Trump, the billionaire populist, mobilized ardent support from the groups most uneasy about the economic, cultural, and demographic trends remaking America. Hillary Clinton, in turn, posted solid, but not resounding, margins among the groups that have most welcomed those changes. That slight imbalance allowed him to breach the Democrats’ “blue wall” at its weakest point—the blue-collar Rustbelt—and rumble to victory. A political scientist might say she fell victim to asymmetrical mobilization.

Trump’s victory was fragile and deeply contested. Trump did soundly defeat her in the states each side treated as the biggest battlegrounds: Florida, North Carolina, and Ohio. But as I write, Clinton has passed him in the national popular vote, and seems likely to stay ahead given that most remaining votes are in West Coast states she won. The key to his win was breakthroughs in Rustbelt states Clinton had thought safely in her corner: Pennsylvania and Wisconsin, and perhaps Michigan depending on the final count. At best, he will win each of those states by margins of about one percentage point or less. (She held Minnesota by a similarly narrow margin.)

Yet all of that and a dime, as people used to say, would get Clinton on the subway. To the astonishment of old-school reporters, new-age data journalists, pollsters in both parties, and to a large extent each campaign, Trump will take the oath next January. I count myself among those not smart enough to see this coming.

As I wrote last week, there were some rumbles that Clinton’s team had taken too much for granted by pouring so much effort into Ohio, Florida, and North Carolina, three swing states she did not need to win—and ultimately did not. The price of that emphasis was extraordinarily little attention to Michigan and Wisconsin, which she did need to win, and also did not. The prescience prize may go to Brent McGoldrick, co-founder of the Republican voter targeting firm Deep Root Analytics, who told me just days before the vote: “This strategy does leave her exposed, particularly in Wisconsin.”

Yet that explanation doesn’t fully explain the outcome. Clinton also lost in Pennsylvania, which she pursued with enormous resources, including an unprecedented final weekend barrage that deployed to the state such stars as Bruce Springsteen, Katy Perry, and President and Michelle Obama. More drove this result than tactics.

The trigger was a genuine social upheaval: a mass uprising by the GOP’s “coalition of restoration.” Those are the older and blue-collar whites, evangelical Christians, and non-urban voters who in polls have consistently expressed both the most economic pessimism and cultural unease about a changing America. Though other data sources may eventually differ, Tuesday’s exit polls did not find that these voters stormed the ballot box in unusually large numbers; in fact, the exits showed the white share of the total vote continuing its decades-long decline as America diversifies.

Instead, those who did vote stampeded to Trump in insurmountable numbers. In particular, Trump beat Clinton among white voters without a college education by an astonishing 39 percentage points—a margin larger than Ronald Reagan’s against Walter Mondale in his 1984 landslide. Trump not only beat her by nearly 50 points among blue-collar white men, but by almost 30 points among non-college-educated white women. (Trump is president largely because white working-class women gave him double-digit margins in key states—a development that may occupy gender studies scholars for years.) Similarly, Trump captured more than three-fifths of rural voters nationwide; in the decisive Rustbelt states—Wisconsin, Pennsylvania, and possibly Michigan—Clinton suffered death by a thousand cuts, as Trump improved over Mitt Romney’s 2012 performance almost everywhere outside the biggest cities.

Clinton could not quite offset this surge with a counter-mobilization of the Democrats’ competing “coalition of transformation” revolving around minority voters, Millennials, and college-educated white women, most of them living in major metropolitan areas. With all those groups, Clinton posted advantages that were solid, but not quite as large as pre-election polls predicted. Likewise, in most metropolitan areas, she delivered entirely respectable margins. But in the decisive states, she didn’t grow enough to offset Trump’s non-metro wave. In the places that mattered most, one side was just more determined to win.

By dislodging Pennsylvania, Wisconsin, and possibly Michigan, Trump shattered the blue wall—the 18 states (plus the District of Columbia) with 242 Electoral College votes that had voted Democratic in at least each election since 1992. If Clinton had defended the blue wall through the Rustbelt, she would have won, because the four diverse Sunbelt battlegrounds (Virginia, Colorado, New Mexico, and Nevada) that she captured would have pushed her past an Electoral College majority. Yet even with her wins in those four states, Clinton ultimately stumbled between the party’s past and future: While Trump toppled heavily blue-collar Rustbelt states that stand as the last monuments to the Democrats’ earlier working-class-based coalition, Tuesday made clear the party’s new coalition of minorities and white-collar whites has not yet grown large enough to reliably hold behemoth Sunbelt battlegrounds such as Florida and North Carolina (much less Arizona or Georgia), especially against a Republican surge in those states’ own substantial blue-collar and non-urban populations.

The result is a genuine hinge point in American history, as consequential as it was unanticipated. If Clinton had won, and swept in a Democratic Senate, the party would have obtained a Supreme Court majority for the first time since 1971. Instead, Republicans can now reinforce the conservative Court majority for years ahead.

In fact, the GOP will now control all the key levers of power in Washington. It will have the capacity to uproot many of Obama’s signature achievements, including his health-care and climate-change plans and Iranian nuclear deal. Democrats will be completely excluded from power, even though it appears likely they will have won the popular vote for the sixth time in the past seven presidential elections, a streak unmatched since the modern party system began in 1828.

On issues from immigration to criminal-justice reform to gay rights, both Obama and Clinton have unreservedly linked their party to the priorities of an increasingly diverse and urbanized America. But that coalition could not quite match the surge from an older preponderantly white America that appeared to many (including me) too narrow to win the White House any longer. A slim Trump victory driven by voters who feared that America’s best days are in the past has now plunged the nation into a bracingly uncertain future.