Donald Trump in New York on election night. Joe Raedle/Getty Images Donald Trump overcame all odds Wednesday, riding the wave of an unprecedented populist movement to put himself in line to be the 45th president of the United States.

The Republican presidential nominee secured the 270 electoral votes needed to win the White House. In doing so, he completed the biggest upset in modern political history, beating his Democratic challenger, former Secretary of State Hillary Clinton, as well as one of the most promising fields of Republican candidates in a generation.

During a speech in Manhattan early on Wednesday, the president-elect promised unity after a dark campaign.

"I pledge to every citizen of our land, that I will be a president for all Americans," Trump said. "And this is so important to me."

He added: "It is time for us to come together as one united people."

Clinton called Trump early Wednesday to concede after the brutal campaign.

"She congratulated us on our campaign," Trump said. "Hillary has fought very long and very hard, and we owe her a major debt of gratitude for her service."

The result came as a shock, to say the least. Markets plunged late Tuesday night as it became clear that Trump would have a better night than expected. Dow futures sunk by more than 750 points.

Almost every major forecasting aggregator, including FiveThirtyEight, RealClearPolitics, The New York Times, and HuffPost Pollster, heavily favored a Clinton victory in the lead-up to Tuesday's race.

The insurgent Republican businessman's candidacy was greeted as a sideshow by many media outlets and even other candidates when he declared on June 16, 2015. But Trump quickly gained popularity among Republican Party voters, many of whom were drawn to his populist message on issues like international trade and immigration, his unscripted speeches — which often included inflammatory rhetoric about identity-politics issues — and his promises to restore the US to previous points of perceived national glory.

Trump's victory Tuesday came amid a wave of support among working-class and blue-collar white voters in numerous battleground states, including Florida, North Carolina, Wisconsin, and New Hampshire. The New York businessman had long claimed his nationalist pitch to voters could spur high levels of voter turnout that would help propel him to the White House.

The mood at Trump headquarters in Manhattan was joyous, as guests drank and shouted when Trump appeared to win Rust Belt states like Wisconsin and Michigan, once reliably Democratic states. Attendees, sporting suits and red "Make America Great Again" hats, appeared equally shocked at Trump's massive upset.

"We're actually going to do it," an attendee remarked as Trump appeared to pull ahead in key states.

Just a mile away on Manhattan's west side, the mood at Clinton's election-night party — to which she ultimately never attended — was also one of disbelief.

Many officials and top allies were shaken.

"This is the lowest moment in my life," a Clinton campaign official told Business Insider.

The Republican presidential nominee will take the oath of office in January with a mandate to fulfill a slate of lofty campaign promises. Trump has pledged several government actions that will certainly rock the US economy, including a renegotiation of the North American Free Trade Agreement, a massive federal infrastructure plan, a moratorium on increasing regulations, and deportation of millions of immigrants illegally living in the US.

He has also promised national-security overhauls, including a potential return to enhanced-interrogation techniques, increasing bombing of ISIS, reevaluating the US relationship with Russian President Vladimir Putin, loosening background checks for purchasing firearms, and forcing Mexico to pay for a border wall on the US's southern border.

Trump will inherit a Congress that has remained plagued by gridlock throughout President Barack Obama's tenure. But he will come into office with Republicans controlling both the House of Representatives and the Senate.

David Anderson and Josh Barro contributed reporting.