Donald Trump's presidential victory defied just about everything supposedly smart people knew about politics and winning the White House.
Not that it mattered.
He prevailed by tapping a force that was far more powerful than the strongest debate performance, the most attention-grabbing TV spot, the savviest turnout operation or the highest-profile surrogates, from the White House down.
He tapped into seething anger and voters' ravenous desire for change.
If people get mad enough, they will storm the polls without prodding — and without, apparently, the need to confide in opinion pollsters, who largely missed the huge outpouring of Americans displaced by decades of economic restructuring and unsettled by the country's changing complexion and shifting cultural mores.
If people get mad enough, they will look past a candidate's overt prejudice, his coarse put-downs of women, his mockery of a disabled journalist, his taunting of a Gold Star family.
Trump won by crashing through Hillary Clinton's so-called blue wall, states that Democrats had won in each of the last six presidential campaigns (Pennsylvania, Wisconsin and Michigan, where he was leading with most of the votes counted) and flipping states (Florida, Ohio and Iowa) that President Obama carried twice.
The battering ram was wielded by an army of working-class white voters, who found a kindred sole in the swaggering Manhattan business mogul who had little use for the please and thank-yous of polite political discourse.
In 2012, the starchy Republican Mitt Romney won working-class whites in Michigan, Ohio, Pennsylvania and Wisconsin by 12 points over Obama. Trump carried them by 30 points over Democrat Hillary Clinton.
"When you think of the theme of 2016, it was rebellion," said Don Sipple, a strategist who helped elect Arnold Schwarzenegger governor in California's 2003 recall election. "Underperforming economy, stagnant wages, escalating healthcare costs, ... 70% saying the country was on the wrong track. You had this incendiary combination ready for combustion."
The GOP nominee might have flouted the conventions of presidential politicking. (He is the first person in history elevated to the Oval Office without first having either government experience or serving in the military.)
But for all his public disavowal of pollsters and disdain for expert advice, Trump was hardly flying blind.
Along with significant help from the Republican National Committee, Trump engaged the voter-targeting services of Cambridge Analytica, a firm that has accumulated thousands of data points — Starbucks preferences, vacation history — on every one of about 240 million Americans.
"Everything we did from the beginning was data-driven," said Brad Parscale, who oversaw a team that targeted Trump voters in key states with operating-room precision. Unlike the Clinton campaign, which was proud to boast of its technological, vote-gathering prowess, "we didn't make a big deal about it," Parscale said.
Kellyanne Conway, Trump's campaign manager, said polling found several states that Obama easily carried twice but where Clinton was stalled below 50%.
"We looked at that and thought there's a Hillary Clinton problem there," Conway told reporters in New York early Wednesday, as stragglers leaving Trump's victory party navigated through empty beer bottles and discarded campaign signs. "There's a reluctance among the voters, and even in our darkest days they weren't breaking for her."
Using early voting data, absentee balloting and other measurements, the campaign homed in on four states at the end of the campaign, a "core four" of Florida, Iowa, Ohio and North Carolina, where Clinton was perceived as especially vulnerable. Trump and his running mate, Mike Pence, were dispatched for repeat visits.
"We could see counties where we had stronger support than Romney did four years ago," Conway said. "We said it would come down to a Pennsylvania, New Hampshire, Wisconsin combination."
Trump carried the "core four" states as well as Pennsylvania, Wisconsin and potentially Michigan. He trailed slightly in New Hampshire, which on Wednesday remained too close to call.
The flip side to Trump's widely unforeseen success was, of course, Clinton's failings, which, inevitably, seem the more glaring in defeat.
She was arguably one of the best-rounded and most experienced candidates ever to seek the White House, having served as first lady, a U.S. senator and secretary of State. For many, however, her decades in public life were one of Clinton's strongest demerits, stamping her indelibly as a part of the hated political status quo.
Her lucrative speechifying made her an unlikely tribune for the working class, once the party's core constituency. Her obsession with privacy led to one of the most damaging blots on her image, her use of a private email server as secretary of State, which played to a reputation for corner-cutting and conniving that has plagued the Clintons, husband and wife, since Bill Clinton first sought the White House in 1992.
There were tactical moves that will long be called into question by Democrats aching to understand her loss. She took states like Wisconsin and Michigan for granted, they griped, until too late.
Some factors were simply confounding.
Trump opened his campaign by insulting immigrants from Mexico, targeted a Mexican American judge he said couldn't be fair because of his heritage, and rarely let up in his harsh language aimed south of the border. Still, he won slightly more Latino support than Romney, whose 27% backing was seen as a warning the party had to ease its hard-line immigration stance or pay a price at the polls.
Bidding for election as the nation's first female president, and facing a candidate with a history of misogynist statements, Clinton ran much stronger among women than Trump, as Democrats usually do. But she barely did better than Obama managed against Romney.
Less surprising was Clinton's fall-off performance among African Americans and millennials, whose interest in voting proved to slacken whenever Obama wasn't on the ballot.
Although Clinton won the popular vote over Trump, it seems likely Clinton will end up winning several million fewer votes than Obama did four years ago — even though he essentially laid his presidency on the line, saying his legacy was on Tuesday's ballot.
It was the sort of all-in, top-to-bottom support Trump never enjoyed from his party.
Many speculated that divisions within the GOP, including the high-profile defection of major party leaders, would prove fatal to Trump, leading rank-and-file voters to follow suit. But their disavowals hardly mattered; indeed, the contempt of party elites may have only served to enhance Trump's image as an outsider and rebel.
He won 90% of the Republican vote. (Clinton won 89% of the Democratic vote, underperforming Obama's 2012 showing by 3 percentage points.)
In the end, for all the ads and analytics, the scandals over emails and tax dodging, the differences over immigration policy and healthcare, Trump's victory can be explained simply.
Voters desperately wanted change in Washington, and Trump, a candidate unlike any ever seen in American history, came to be its galvanizing force.
Barabak reported from Los Angeles and Finnegan from New York.