America, notoriously divided by politics, was on Wednesday a nation united in shock.

Not since Truman beat Dewey more than six decades ago had there been anything like it. The shock extended from true believers who were there when real estate mogul came down the Trump Tower escalator 17 months ago to diehard Never Trumpers. It stretched from Wall Street to Embassy Row to Hollywood.

But why was the outcome of the 2016 presidential election so shocking?.

Trump had long ago established himself a political savant. Without ever having run for, or served on, so much as a school board, he emerged from a deep, experienced field to capture the Republican nomination.

And pre-election polls showed Clinton with only a narrow lead, the sort of edge that the Brexit vote earlier this year had showed to be so tenuous.

Consider, in contrast, the hole in which President Harry Truman stood in 1948 against New York Gov. Thomas Dewey. Not only did Truman lag in every public opinion poll, but his Democratic Party was ideologically split; its left and right wings each ran candidates in the general election.

If Truman could win, anyone can. But Americans were shocked when Trump did.

The epicenter of awe was the Javits Center in New York, where Clinton held an election night party that became a wake. It extended to her alma mater, Wellesley College, where thousands of women from around the world came to celebrate America's first female president. And from there to foreign trading desks, where U.S. stock futures plummeted.

"I'm shocked,’’ Duke University freshman Divya Juneja told the campus paper. “I honestly thought this election would be a landslide.’’

Clinton partisans weren’t the only ones surprised. Consider Barry Fixler, a jeweler who opened a Trump headquarters last year on his own dime in his town, Bardonia, N.Y. On Tuesday, with the polls still open, he declared the election lost — rigged for Clinton, he said

The next day he was ecstatically agog. “Never saw this coming,’’ he said

Why did so many people feel the same way?

Partly it was the polls, which in aggregate created the impression Clinton was inevitable. She wasn’t far ahead, but she’d been ahead for so many months that some people had trouble imagining any other result.

“After the conventions I had a sense Trump had a serious chance, but I got lulled by the polls,’’ said no less an expert than Boston College political scientist Marc Landy, author of Presidential Greatness. “The pollsters have a lot to answer for.’’

Partly it was the decisiveness of Trump’s victory — how he won so many battleground states so narrowly, including ones like Pennsylvania and Wisconsin that had seemed like Democratic bastions.

Partly it was because many Clinton supporters could go for weeks without talking to a Trump supporter. The signs were there — literally, on countless front yards, most of them in places other than the bigger cities and more affluent suburbs. “We didn’t pick up on that, or on the size of the crowds at his rallies,’’ said Terry Madonna, director of the Franklin and Marshall College Poll.

Partly it was because many Trump supporters (like Fixler) believed their candidate’s claim that the election was rigged against him — a lost cause.

Partly it was because Trump’s policies and plans remain vague (like getting Mexico to pay for a Southern border wall) or frightening (mass deportations of undocumented immigrants). “He was a candidate with no detailed program,’’ Landy said. “He’s taken many stands and has many policies. Which does he care about? Sometimes I wonder if he knows.’’

And partly it was the simple realization — which came to some only when they actually saw Trump claim victory around 3 a.m. ET on the stage of the New York Hilton — that “the American people have elected Donald Trump president,’’ said the novelist Thomas Mallon, enunciating the words as if they were painful.

After that, he said, “I left the Republican Party.’’

Until that moment, said Madonna, “a lot of people just couldn’t believe Trump could win after the kind of campaign he ran. Who’s ever heard of a candidate in this country threatening to throw the other candidate in jail? There was a lot of suspended disbelief.’’

The election of 1948 remains the one by which all political shockers are measured. Truman pulled off an upset that produced a classic image: him holding up a newspaper front page with the headline “DEWEY DEFEATS TRUMAN.’’

If the outcome was surprising, the winner himself was (unlike Trump) the most known of political commodities. Truman had been president for more than three years, dropped the atomic bomb on Japan and presided over the end of World War II. He was a machine Democrat who’d spent his adult life in government. And he wasn’t that different from the presumed winner, a moderate internationalist anti-communist like himself.

Mallon, author of the novel Dewey Defeats Truman, was asked to compare the two election results. Trump’s win was less surprising statistically than Truman’s, he said, “but civically, this is a bigger shock.’’