His candidacy was born in spectacle, nurtured on controversy, and careered from one self-inflicted disaster to another, overturning every rule of modern American politics along the way. With virtually no on-the-ground organization, lackadaisical support at best from the leaders of his own party, and outspent by a large margin in advertising, Donald J. Trump won the presidency with a campaign built around raucous rallies and a visceral appeal to a shrinking slice of the American electorate, the rural and small-town white working class. To say he did it his way is almost an understatement.

He was helped by running against a deeply unpopular opponent. Historians will debate how much damage was done to Hillary Clinton during the week that the FBI kept the country in suspense over a renewed investigation of her emails, but her troubles with the electorate began long before and ran deeper. She took a hit in the primary from the left wing of her party, and analysts will be poring over exit polls to figure out whether the Sanders voters defected in numbers large enough to affect the outcome. But in the end, Americans just didn’t like or trust Clinton, and the chance to make history by electing the first woman president of the United States didn’t bring enough women to her side to offset Trump’s huge advantage among white men.

U.S. President-elect Donald Trump speaks at his election night rally in New York, on Nov. 9, 2016. (Carlo Allegri/Reuters)

Ad-libbing his way through speeches and firing off random tweets, Trump was riding a historical wave that almost no one saw coming: a resurgence of economic and ethnic nationalism sweeping the Western democracies. Even those whose job it was to detect it — public-opinion pollsters — were caught by surprise. Trump’s victory was an echo, amplified a hundred times, of the Brexit vote that opted to take Britain out of the European Union. Right up through Tuesday night, most polls put the odds of a Trump victory at well below 50 percent — vanishingly small, in some cases — and media organizations that had planned their coverage around a Clinton victory scrambled to get a handle on the new world they found themselves in.

Story continues

Even some in Trump’s inner circle were “shocked,” as one aide put it, watching the results roll in to the candidate’s headquarters in Trump Tower. “I had hoped for this,” one campaign source said. “I knew there was a chance for this, but I gave it a 30 percent chance. I thought we would come up just short.” His indefatigable campaign manager, Kellyanne Conway, had begun the evening making pre-emptive excuses for a loss, complaining to Chuck Todd of NBC that “We didn’t have the support of the full Republican infrastructure.” But midway through the night, she was revising that opinion, telling reporters that the Republican National Committee had been an “excellent partner” to the campaign. “Absolutely buoyant. We can smell the win,” Conway texted to Yahoo News.

The mood was jubilant at Trump’s victory party at the New York Hilton, where cheers were punctuated by shouts of the de facto Trump campaign slogan — “Lock her up!” — and, in honor of FBI Director James Comey, who may have helped turn voters away from Clinton: “Comey! Comey!”

Did the Clinton campaign sense the unfolding disaster? In the late afternoon, Clinton campaign manager John Podesta was spotted stalking through Times Square with a grim frown. The mood at the Javits Center — where Clinton expected to give a victory speech under New York City’s largest glass ceiling — shifted from confident celebration, to concern, to grief, as Tuesday wore on. The campaign’s uplifting videos, featuring Clinton’s childhood friend testifying to her “goodness,” jarred with the increasingly downcast mood of the crowd.

Supporters of Hillary Clinton react as they watch returns at the election night rally in New York. (Rick Wilking/Reuters)

By around 1 a.m., volunteers and supporters began leaving, some in tears, others seemingly in shock.

At the beginning of the night, the Clinton campaign told reporters that the candidate and her entire family were watching returns come in at a nearby hotel. An aide even described the outfit Clinton’s granddaughter was wearing, providing colorful details to her press corps. But starting at about 10 p.m., the campaign went silent, and even lower-level campaign aides disappeared from the Javits Center. Around 2 a.m., Podesta appeared briefly at the podium to send the crowd home; the campaign would have more to say Wednesday morning.

Meanwhile, Clinton’s surrogates started to confront the prospect of defeat.

Julián Castro, the U.S. secretary of housing, looked depressed as he contemplated a Trump presidency around 1 a.m. Tuesday night in the somber Javits Center.

“If Donald Trump wins, aside from the politics, the immediate concern is that he become a leader and a president and not just a campaigner,” Castro said, adding that Trump has an “enormous” responsibility to become steadier as president.

When asked if he believed Trump would build a wall on the U.S.-Mexico border, Castro replied, “My hope is that would never happen.”

“What you saw today was not a mandate for every little utterance he made, like building a wall or having a deportation force,” Castro said. “I believe it was an expression of a desire for change.”

Meanwhile, former Gov. Howard Dean of Vermont told Yahoo News via email that the surprise upset was “a successful populist revolt,” and added that he believes NATO “is in danger.” Asked what went wrong with Clinton’s campaign, he replied, “Who knows?”

____

Supporters of Donald Trump react to reports that he won North Carolina as they watch results in Times Square in New York. (Photo: Seth Wenig/AP)

Trump ran as the candidate of change, and his victory will be seen as a renunciation of the status quo. But a call for change is one of the reliable constants of American politics, and by most traditional measures, the United States is not in grave crisis. Unemployment is below 5 percent, crime in most cities is low by the standards of a decade ago, and the militant Muslim group ISIS, although still a threat, is losing territory in Iraq to a coalition of American allies, with minimal U.S. casualties. But when Donald Trump told his vast crowds of followers that America was losing all over the world, they believed it — and agreed that he was the person who could reverse it.

The reverberations were felt around the world, as stock markets and the dollar plunged in reaction to a victory of a candidate who had run a campaign against international finance and free trade. The Mexican peso took the biggest hit of all, and gold, the traditional refuge of capital in turbulent times, soared.

Trump alienated immigrants, made enemies of Muslims, insulted and mocked women, and still won. He left unchallenged the belief that he had avoided paying federal income taxes for years; he faced plausible, if unproven, accusations of running a fraudulent business (his “Trump University”); and he retweeted racist and anti-Semitic images and memes — and still he won.

Hillary Clinton, who had come in for praise — including from Trump himself — as an effective senator and secretary of state while she held those offices, was endorsed by practically every newspaper in the country. She raised far more money than he did and campaigned with a popular president, with her own chief opponent in the party, with Beyoncé and Bruce Springsteen — and still she lost.

Trump will take office under a cloud of litigation, including the lawsuits he has vowed to file against 11 women who have accused him of making unwanted sexual advances. Gloria Allred, who represents several of the women, said she assumes that as president-elect, Trump will have better things to do. But there are also lawsuits charging that his eponymous “university” was a scam that bilked students out of thousands of dollars of tuition. One of those is scheduled to go to trial on Nov. 28 before U.S. District Judge Gonzalo Curiel, who Trump has claimed cannot preside impartially over the case, given his Mexican heritage. If Trump abides by his promise not to settle the suit, he will have to appear in court in person.

Republican President-elect Donald Trump gives his victory speech on election night at the New York Hilton in New York on Nov. 9, 2016. (Photo: Jim Watson/AFP/Getty Images)

Trump carried along to victory enough senators and members of the House to ensure that the country will be run by Republicans for at least the next two years. Unlike Clinton, who was surrounded by a large retinue of policy advisers who had served years in government, Trump has a relatively small circle to draw upon to staff his administration. Rudy Giuliani, a U.S. attorney and associate attorney general before he became mayor of New York, has been mentioned as a possible attorney general. In the closing days of the campaign, he warned, “There’s a revolution going on inside the FBI” because agents were being blocked from investigating Hillary Clinton and the Clinton Foundation. Giuliani could be expected to give them a green light.

Michael Flynn, the retired U.S. Army general who has served as Trump’s chief foreign policy adviser, seems a likely candidate to become Trump’s national security adviser or possibly director of national intelligence.

There are a few other outsize personalities close to Trump who can be expected to play big roles: Former House Speaker Newt Gingrich or New Jersey Gov. Chris Christie could be in the running for chief of staff.

But mainstream Republican officeholders like Paul Ryan, the speaker of the House, don’t share most of Trump’s agenda — and many of them, including Ryan himself, are reliably said to detest him personally. The foreign policy wing of the party was appalled by Trump’s ascent, regarding him as naively fixated on trade issues with Mexico and China and dangerously unconcerned about the threat of a resurgent Russia. But the party has a platform that includes tax cuts for the top income brackets, repealing Obamacare, drastically pruning business and environmental regulation, and reversing the Obama administration’s climate-change initiatives. Undoubtedly to their surprise, they now appear likely to get all that — along with a border wall, a deportation force and an unpredictable president with almost no grounding in policy or connections to party leaders. It may turn out to be a lesson about being careful what you wish for — but it is a problem the Democrats can only wish they had instead.

Reporting by Liz Goodwin, Hunter Walker, Michael Isikoff, Holly Bailey and Lisa Belkin.

_____

Related slideshows:

Protests after Donald Trump’s victory >>>

Newspapers around the world react to Donald Trump’s victory >>>

Tears and cheers as Donald Trump and Hillary Clinton supporters clash at the White House >>>

World reaction to Trump’s stunning victory >>>

Trump defeats Clinton in 2016 election >>>

Election Night in America! >>>

Americans go to the polls to elect the 45th president >>>

Hillary Clinton and Donald Trump hold final rallies on Election Day eve >>>

Donald Trump’s America, Part 2 >>>

Donald Trump inspires his own brand of fashion on the campaign trail >>>

Face-off: Documenting the expressive battle between Hillary Clinton and Donald Trump >>>