NEW YORK — Donald J. Trump will be the 45th president of the United States, the Associated Press projected Wednesday. He will be the first person to hold the office despite having no prior political or military experience.

“It’s time for America to bind the wounds of division,” Trump, who was flanked by his family and running mate Mike Pence, told the crowd inside the Hilton hotel in midtown Manhattan. “To all Republicans, Democrats and independents across this nation: I say it is time for us to come together as one united people. It’s time.”

The Republican nominee’s victory over Hillary Clinton marks a stunning upset that neither the polls nor the pundits saw coming. But Trump, defiant to the end, insisted he would win, despite burning bridges with key voting groups and even many Republicans. In winning, Trump upended almost every norm of American politics and apparently changed the shape of the Republican Party.

Clinton called Trump to concede the race shortly before he took the stage. A Clinton campaign official confirmed to Yahoo News that the Democratic nominee had conceded the race.

“I’ve just received a call from Secretary Clinton,” he said. “She congratulated us — it’s about us — on our victory. And I congratulated her and her family on a very, very hard-fought campaign. I mean, she fought very hard. Hillary has worked very long and very hard over a very long period of time, and we owe her a major debt of gratitude for her service to our country. And I mean that very sincerely.”

Republican president-elect Donald Trump walks onstage with son-in-law Jared Kushner, wife Melania, daughter Tiffany, and other family members at the Hilton Midtown in New York City early on Nov. 9, 2016. (Photo: Getty Images)

Trump spent the final three weeks of his once-unlikely White House bid railing against a “rigged” election, alleging without evidence that voter fraud was widespread. He even hinted at the idea of not conceding the race if he lost, jokingly promising to accept the results of the election “if I win.”

But the brash billionaire also predicted that he would shock the establishment and said his campaign would be “Brexit plus plus,” a reference to Britain’s exit from the European Union, which also was not forecast in the polls. And in the end, to borrow one of Trump’s favorite expressions, he did indeed exceed expectations “big league.”

Story continues

“They all told it wrong from day No. 1,” Michael Cohen, a longtime Trump adviser and Trump Organization attorney, told Yahoo News.

“America is going to see the change that it deeply needs, and they’re going to have a leader, a real leader,” Cohen added.

Trump spent the night huddled with family and friends, watching the returns inside the Hilton in midtown Manhattan, where one Trump campaign source initially said some allies expected him to lose and were simply hoping he would outperform Mitt Romney’s showing in the 2012 presidential race. But as the night wore on, the Trump team became more optimistic and began to think the celebrity businessman had a chance, based on razor-thin margins in battleground states. After Ohio was called for Trump, the same source predicted that even the Democrats might also be changing their assessments of Trump’s chances.

Shortly before 2 a.m., Clinton campaign chairman John Podesta had appeared onstage at the Javits Center in Manhattan, telling Clinton’s supporters that the candidate would not be appearing.

“We’re not going to have anything more to say tonight,” Podesta told the crowd. “We’ll have more to say tomorrow.” He added: “We are so proud of you, and we are so proud of her.”

Hillary Clinton’s campaign chairman, John Podesta, walks offstage at Clinton’s election night rally in New York on Nov. 9 after telling the crowd to go home as results continued to trickle in. (Photo: Jim Bourg/Reuters)

Before Trump was projected the winner, his campaign manager, Kellyanne Conway, had described a jubilant atmosphere in his war room in a text to Yahoo News.

“Absolutely buoyant. We can smell the win,” Conway said.

The crowd that waited to see Trump speak in a ballroom at the Hilton cheered each time a state was called for him. (Not surprisingly, the television monitors at the event were showing Fox News, the cable news network favored by conservatives on which Trump had appeared often.)

“I had hoped for this,” a second Trump 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.”

Polls had widely shown Trump to be an underdog against Clinton, the Democratic nominee who faced a series of questions over her use of a private email server and how her family foundation interacted with the State Department during her tenure as secretary of state. But those polls were apparently wrong.

Clinton had enjoyed a double-digit lead over Trump in national polls following the presidential debates, but she saw that cushion evaporate after FBI Director James Comey set off a political firestorm 10 days before Election Day. Comey said newly discovered emails potentially related to the investigation of Clinton’s use of the private email server were being reviewed, and Trump started predicting that she would be indicted. On Sunday, Comey said a review of those emails did not change his position that Clinton should not face criminal prosecution.

Supporters of Donald Trump cheer as they watch returns during an election night rally on Tuesday, Nov. 8, in New York. (Photo: Evan Vucci/AP)

The election results indicated that Trump outperformed expectations among working-class whites, forming a coalition of states that few thought possible when the campaign began. Meanwhile, Clinton underperformed among college-educated and young white women.

In the end, Clinton failed to overcome the showman, who gobbled up thousands of hours of free airtime on cable news by making a series of controversial and improbable promises, like a pledge to build a wall along the southern border of the U.S. and a promise to “shut down” Muslim immigration. Trump also stayed in the spotlight by fighting a series of feuds and raging against the media. And despite Clinton’s strong performance in the presidential debates, in which she goaded Trump into gaffes and kept the focus squarely on his shortcomings, she could not translate those performances into votes.

Trump’s election is already sending shock waves through the political system because it signals a repudiation of establishment politicians that, to many voters, the Clintons represent. The property magnate and former “Celebrity Apprentice” host, one of the most unconventional major-party candidates in U.S. history, had vowed to “drain the swamp” of Washington, D.C. He derided many of the leaders he’ll likely now need to work with, such as House Speaker Paul Ryan and many other congressional Republicans.

It remains to be seen if President-elect Trump will be able to heal the country’s sharp political divisions, some of which were sparked by his campaign.

But the Queens, N.Y.-born Trump, 70, will have to face all of those challenges and more when he is inaugurated in January.

“Working together, we will begin the urgent task of rebuilding our nation and renewing the American dream,” Trump said. “I’ve spent my entire life and business looking at the untapped potential in projects and people all over the world. That is now what I want to do for our country. Tremendous potential — I’ve gotten to know our country so well — tremendous potential. It’s going to be a beautiful thing.”

“The forgotten men and women of our country will be forgotten no longer,” he continued. “We are going to fix our inner cities and rebuild our highways, bridges, tunnels, airports, schools, hospitals. We’re going to rebuild our infrastructure — which will become, by the way, second to none. And we will put millions of our people to work as we rebuild it.”

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

_____

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 >>>