Donald Trump has stunned America and the world, riding a wave of populist resentment to defeat Hillary Clinton in the race to become the 45th president of the United States.

The Republican mogul defeated his Democratic rival, plunging global markets into turmoil and casting the long-standing global political order, which hinges on Washington's leadership, into doubt.

Trump secured at least 290 electoral votes, securing more than the 270 he needed to succeed Barack Obama.

His Democratic rival Hillary Clinton had 218 electoral votes, a crushing defeat for the former secretary of state.

Read: How America voted: anger, desire for change behind shocking Trump upset

"Hillary Clinton fought very hard... We owe her a major debt of gratitude to our country," Trump told a crowd of jubilant supporters in the early hours of Wednesday in New York.

The businessman turned TV star turned-politico ─ who has never before held elected office ─ will become commander-in-chief of the world's sole true superpower on January 20.

'A president for all Americans'

"It’s been what they call an historic campaign," Trump said, addressing a cheering crowd at his victory party. "But to be really historic, you have to do a great job. And I promise you that we will not let you down."

"I will be a president for all Americans," the president-elect pledged. "For those who didn't support me... I am reaching out to you for your help so we can unify our great country... Now it is time for America to bind the wounds of division."

US President-elect Donald Trump greets supporters along with his wife and family during his election night rally. ─ Reuters

"We will get along with all other nations willing to get along with us... Nothing we want for our future is beyond our reach. America will no longer settle for anything less than the best."

"While we will always put America’s interests first, we will deal fairly with everyone."

"Ours was not a campaign but rather an incredible and great movement made up of millions of hardworking Americans... While the campaign is over, the work on this movement is only just beginning."

"It's a movement comprised of Americans of all backgrounds religions and races," he said.

Trump took to the stage with his wife, Melania and his youngest son. Concluding his speech, he thanked his wife and his children, Don, Ivanka, Eric, Tiffany and Barron. "I love you and I thank you. And especially for putting up with all of those hours. This was tough."

"I love this country. Thank you."

Trump's vice-presidential running mate, Mike Pence who spoke before Trump termed it "a historic night."

"The American people have spoken, and the American people have elected their new champion. America has elected a new president," Pence said.

Oldest US president

Although he has no government experience and in recent years has spent as much time running beauty pageants and starring in reality television as he had building his property empire, Trump at 70 will be the oldest man to ever become president.

Yet, during his improbable rise, Trump has constantly proved the pundits and received political wisdom wrong.

Opposed by the entire senior hierarchy of his own Republican Party, he trounced more than a dozen better-funded and more experienced rivals in the party primary.

But the biggest upset came on Tuesday, as he swept to victory through a series of hard-fought wins in battleground states from Florida to Ohio.

Campaign reveals faultlines

During a bitter two-year campaign that tugged at America's democratic fabric, the bombastic tycoon pledged to deport illegal immigrants, ban Muslims from the country and tear up free trade deals.

Read more: Five controversies that dominated Donald Trump's campaign for president

His message appears to have been embraced by much of America's white majority, disgruntled by the breath and scope of social change and economic change in the last eight years under their first black president, Barack Obama.

Trump openly courted Russian leader Vladimir Putin, called US support for Nato allies in Europe into question and suggested that South Korea and Japan should develop their own nuclear weapons.

During the race, he was forced to ride out allegations of sexual assault and was embarrassed but apparently not shamed to have been caught on tape boasting about groping women.

And, unique in modern US political history, he refused to release his tax returns.

The US election results prompted a global market sell-off, with stocks plunging across Asia and Europe and billions being wiped off the value of investments.

Legacy of ashes

Clinton had been widely assumed to be on course to enter the history books as the first woman to become president in America's 240-year existence.

Americans have repudiated her call for unity amid the United States' wide cultural and racial diversity, opting instead for a leader who insisted the country is broken and that "I alone can fix it."

If early results hold out, Trump's party will have full control of Congress and he will be able to appoint a ninth Supreme Court justice to a vacant seat on the bench, deciding the balance of the body.

So great was the shock that Clinton did not come out to her supporters' poll-watching party to concede defeat, but instead called Trump and sent her campaign chairman to insist in vain the result was too close to call.

"I want every person in this hall to know, and I want every person across the country who supported Hillary to know that your voices and your enthusiasm mean so much to her and to him and to all of us. We are so proud of you. And we are so proud of her," chairman John Podesta told shell-shocked supporters.

"She's done an amazing job, and she is not done yet," he insisted.

Brutal humiliation for Obama

The election result was also a brutal humiliation for the White House incumbent, Obama, who for eight years has repeated the credo that there is no black or white America, only the United States of America.

On the eve of the election, he told tens of thousands of people in Philadelphia that he was betting on the decency of the American people.

"I'm betting that tomorrow, most moms and dads across America won't cast their vote for someone who denigrates their daughters," Obama said.

"I'm betting that tomorrow, true conservatives won't cast their vote for somebody with no regard for the Constitution," he added.

His bet appears to have been flat out wrong, and America's first black president will be succeeded by a candidate who received the endorsement ─ albeit unsought and unacknowledged ─ of the white supremacist Ku Klux Klan.

Trump's shock victory is just the latest evidence that globalisation has eroded faith in liberal political leadership.

From Britain's vote to leave the European Union to the rise of far right populists and nationalists in continental Europe, opposition to open trade and social and racial tensions are on the rise.