NEW YORK — Donald Trump was right.

During a rally last week in Minnesota, as the GOP nominee rooted around in traditionally Democratic turf for electoral votes that could launch him to the White House, he shrugged at detractors who doubted his seemingly long-shot strategy.

“So far, in two years, I’ve been right and they’ve been wrong,” Trump said of the television pundits who had declared the race finished. “We’re going to have some surprise on Tuesday.”

The vote Tuesday indeed unfolded as one of the great stunners in American political history. Trump will be the next president of the United States, having surged on Election Day in states, including Wisconsin and Pennsylvania, that many Republicans had written off. His victory signaled the rise in America of populism and nationalism, under Trump’s banner of “America first” and his pledge to “make America great again.”

Trump addressed his supporters early Wednesday at a hotel in midtown New York City, shortly after the major television networks had called the race. Acknowledging the acrimony of the campaign and adopting a softer tone, he promised “every citizen that I will be president for all Americans.”

“Now it is time for America to bind the wounds of division,” Trump said. “It is time for us to come together as one united people.”

“I promise you that I will not let you down,” he added. “I love this country.”

Although Hillary Clinton did not deliver public remarks, Trump said she called to congratulate him and concede the race.

“She fought very hard,” he noted. “Hilary has worked very hard over a long period of time, and we owe her a debt of gratitude for her service.”

The evening marked a stunning finish to Trump’s unlikely rise from first-time candidate to the highest political office. Most prognosticators first said he would not run, and then believed he could not win. But at every turn he upended expectations and conventional wisdom, and proved more resilient than his rivals judged.

Trump also proved to be an effective conduit for his core message: a populist, nationalist appeal that featured harsh anti-immigrant, anti-trade rhetoric — beginning with the speech that launched his candidacy in which he characterized undocumented Mexican immigrants as “rapists” and pledged to “renegotiate our foreign trade deals.” Those themes drew a historic share of white working-class voters to Trump, swelling turnout in rural areas as Clinton’s coalition of college-educated voters and minorities underperformed.

“Donald Trump rewrote the map of the United States,” said Rep. Pete King, a New York Republican who backed the nominee. “The political world will never be the same again.”

On the campaign trail, Trump had recently taken to calling himself “Mr. Brexit,” a nod to the surprising vote earlier this year by Britons to withdraw from the European Union. That groundswell also caught politics watchers unaware, and was propelled by the same political sentiments that elevated Trump.

His victory Tuesday bore striking similarities to that event, not only in the forces driving it but in the complexion of Trump’s supporters, who were on the whole less educated than Clinton’s and more likely to live in exurban or rural areas.

“I hate to compare this too much to Brexit, but it’s kind of a Brexit effect,” said Matt Oczkowski of Cambridge Analytica, a data firm used by the Trump campaign. “Rural turnout was crazy.”

“It turned out this disenfranchised Trump voter that we’ve been talking about, it’s really true,” Oczkowski added.

The strategy was the brainchild in particular of Trump Campaign Chairman Steve Bannon, who had no prior campaign experience when he signed on to work for Trump from Breitbart News, an outlet that served as Trump’s mouthpiece during the election. Beginning in mid-September, Bannon directed that the campaign redouble efforts in Michigan, New Hampshire and Maine, states that were not on most radar screens. And he pored over the demographics that he thought would respond to Trump’s message.

Bannon “has got a real interest in the middle America, Midwest electorate and reclaiming the working class for the Republican Party,” said one Trump campaign aide, “so you saw him doing a lot more to focus on states like Michigan.”

But, as with Brexit, Trump’s ascension to the presidency will now feature a great deal of uncertainty likely to wreak havoc, at least initially, on financial markets and the international community. Futures trading was halted late Tuesday as investors panicked at early signs of Trump’s victory.

Gerard Araud, French ambassador to the United States, tweeted: “A world is collapsing before our eyes. Dizziness."

“They said the same thing when Ronald Reagan got elected — all the foreign countries got upset,” King assured reporters at Trump’s victory party. “They’ll get used to it, too.”

Meanwhile, Russian President Vladimir Putin, whom Trump praised throughout the election, sent the victor a message of congratulation early Wednesday, the Associated Press reported.

The result early Wednesday, while a shock to the United States and the world, unquestionably traces its roots to the presidential election four years ago. On the morning after Mitt Romney lost, Trump took to Twitter, writing for the first time: “We have to make America great again!”

In the aftermath, the Republican Party had one answer to Romney’s defeat: to temper its harshest rhetoric and seek to expand its reach to minorities and women.

Trump had another solution.

The celebrity businessman ultimately adopted a populist message that had more in common with Rick Santorum’s approach during the 2012 Republican primary than with Romney’s — coupling severe protectionist rhetoric with his unique image as a Washington outsider free from personal debts to special interests or party powerbrokers.

Those elements appealed to a deeply disaffected electorate, even as the nation’s economy has improved overall and added jobs.

“The American people aren’t happy. The American people have the right not to be happy,” said Alabama Sen. Jeff Sessions, a prominent Trump supporter who also advised the campaign. “Some people think this is just some mindless anger out there. That is not correct.”

“People underestimated the discontent that average Americans felt,” echoed Joe Borelli, a New York City councilman and a visible Trump supporter on cable news throughout the election. “It was palpable to everyone who travelled the country, but the media and pundits were blind to it.”

The voters who elevated Trump to victory chose to overlook his historically low favorability ratings, which rank him among the most unpopular presidential candidates ever, and concerns about his temperament and qualifications. Clinton, in her campaign, sought to depict Trump as fundamentally unfit for the office of the presidency.

Trump also overcame multiple major setbacks and controversies, including an audio recording released in the final stretch of the campaign in which Trump bragged that his celebrity enabled him to kiss women without consent and “grab them by the pussy.”

But Trump notably became more disciplined in the final phase of his campaign, when he brought on Bannon and promoted Kellyanne Conway, a pollster with particular experience in campaign messaging. As Trump’s mouthpiece, Conway worked with the Republican nominee to soften his tone and urged him to stay on message, entreaties he mostly followed.

Now, Trump will face a climb not only to unite Americans around him, but also to govern with lawmakers, Republican and Democratic, who view him skeptically or reject him entirely. Bringing together Republicans will likely be the first order of business, and Trump praised Republican National Committee Chairman Reince Priebus on Wednesday as “a superstar.”

King said he had no doubts the president-elect will succeed at governing. “He’s overcome every obstacle up to now, and this is the final obstacle he’ll overcome,” he said. “Let’s face it: Donald Trump likes to make things work. He wants to get it done.”