Arriving on stage to the music from Air Force One and surrounded by his family at the Hilton Midtown hotel, Trump made the conventional promise, to be "president for all Americans" and to bring Republicans and Democrats together – after 16 months of campaigning through which he shredded his own party and Clinton's. President-elect Donald Trump gives his acceptance speech on Wednesday. Credit:AP He promised to create millions of jobs in rebuilding the nation's infrastructure, especially its inner cities, better care for veterans and a doubling of economic growth in what he described as a "national project of renewal." Speaking to the international community, he said: "We will get along with all other nations willing to get along with us. America will no longer settle for anything less than the best. "We must reclaim our country's destiny, and dream big, and bold and daring. I want to tell the world community that while we will always put America's interests first, we will deal fairly with everyone."

Clinton did not appear in public, but her campaign chairman John Podesta made a brief 2am appearance at what was to be her victory bash at Manhattan's Javits convention centre, telling supporters to go home: "We're still counting votes and every vote should count ... We're not going to have anymore to say tonight ... We'll have more to say tomorrow." Trump supporters Credit:Getty Images But the race was all but over. An angry, distrustful electorate seemingly had positioned a fractured Republican Party on the cusp of an utterly unexpected clean sweep – the White House and both houses of Congress – that will give it the power to, as its members see it, right all that is wrong with America. And it didn't make sense – only hours earlier, the voters who might have just elected Trump as president had been interviewed by exit pollsters, with more than 60 per cent of them rating Trump as unqualified for the White House. And the US was set to transition power from its first black president to a candidate endorsed by the Ku Klux Klan. President-elect Donald Trump, right, shakes hands with Vice-President-elect Mike Pence during his victory party. Credit:AP

Just as in Europe, the US has been engulfed by a tide of populist nationalism, with disaffected whites angrily venting at their modern multicultural societies, believing their personal and national power and prestige, political and cultural, are in decline. Exit polls indicated that in the struggle for the votes of electors who didn't like either of the candidates, historically, the most unpopular ever to seek the presidency, Trump outgunned Clinton by almost two to one. Donald Trump. Credit:AP Clinton's "Stronger Together" message didn't make the cut. Instead voters plumped for the inherent ugliness of Trumpist policies, which when reduced to a single line, call white Americans to stick with Trump for protection against job-stealers and terrorists among the black and brown "other" communities.

People react to the announcement that Republican presidential candidate Donald Trump has carried another state in Salt Lake City. Credit:Salt Lake Tribune/AP Stunned and angry, senior Democrat strategists were laying all the blame for their defeat at the feet of a single man – FBI director James Comey, whose unprecedented in-out intervention in the campaign threw the Clinton campaign off what was widely assumed to be an easy glide into the Oval Office. Chants of "lock her up" broke out at Trump's newest hotel, the old post office in Washington, as he claimed North Carolina. City crowds in New York seemed to be in a state of zombie-like shock. And a joker at Trump's private party in Manhattan reportedly interrupted whispered conversations about whether Trump really would attempt to jail Clinton, to ask what size prison jumpsuit she would wear. Supporters of Donald Trump at a Republican watch party at the Grand Hyatt Atlanta. Credit:NYT And after all Americans' chuckling at the expense of Britain in the wake of its ethno-nationalist, nativist Brexit vote, the US can now fully expect the same treatment from much of the international community. And foreign capitals will be left to wonder where they and Washington now stand in the world on complex issues ranging from NATO to the Syria-Iraq crisis to nuclear proliferation.

At 9.11pm it became clear this would not be the Clinton cakewalk inferred by the last pre-election polls. Her chances of winning, as calculated by The New York Times, were sliding precipitously; down from 84 per cent at the start of the night to 68 per cent … 10 minutes later, down to 59 per cent; and 10 minutes later again, Trump quite suddenly had a better chance of winning, 51 to 49. Hillary Clinton supporters in Dallas check results as Donald Trump began to pick up wins in key states. Credit:Dallas Morning News/AP All expectations of an early result faded and the talk was of markets taking a hit like they did after the September 11 attacks. Hedge fund managers who, until about then, had factored a Clinton win into their market calculus were badgering political analysts; and Bridgewater Associates, purportedly the world's biggest hedge fund, predicted market chaos – maybe as much as 2000 points off the Dow when markets opened on Wednesday. Suddenly, analysts were speaking in terms of Clinton being lucky if she could still "eke" out a win – in which case her punishment would have been enough of a win for Trumpism to guarantee political survival for its architect. Hillary Clinton and her husband former president Bill Clinton talk after voting in Chappaqua, New York, on election day. Credit:AP

After three hours of counting a new snapshot of America was emerging – less-educated white voters, about 40 per cent of the electorate, were voting en bloc for the GOP, robbing the Democratic Party of a chunk of its white working-class ballast and leaving it more a party of minorities in a country divided by race and class, by opportunity and power. Trump seemingly was riding the revenge of the white working class, the true recipients of his promise to "Make America Great Again", in a nation that no longer knew its other parts. And the air beneath his wings came from surprise modelling miscalculations by the Clinton machine and most independent pollsters; and the emergence of what we were told didn't exist – a game-changing army of "shy" or Brexit-like Trump voters. It was a nail-biting race to the end. It was a night like the running of the bulls in Pamplona – and Trump was ahead of the herd and running faster than Clinton. Florida quickly emerged as the first real contest, a "must-win" swing state in which Trump made his last stand. Here, the count was unnervingly tight and slower than predicted – with 60-plus per cent tallied, Trump was one point ahead – 49 to 48, prompting mutterings that Florida might relive its sensational "hanging chad" recount from the 2000 election.

Another "must-win" for Trump was Ohio – and he was doing well in the early count there. By 10.30 it seemed that the White House would be decided by the voters of Michigan, Pennsylvania or Wisconsin, always critical in Trump's Rust Belt strategy, but in all three of which Clinton held such a healthy polls lead that Michigan and Wisconsin got less attention than they deserved – obviously. And yet, all three have a certain political pathology – it seemed that if Trump had cleaned up in Ohio, he'd have a good chance of snatching Michigan and Pennsylvania – and two more sets of opinion polls could go on the evening's bonfire. By 11pm, Trump's chances of winning were at a dizzying 94 per cent. There were technological glitches, but not the full-throated campaign of overt voter intimidation that had been anticipated in the wake of Trump's constant bleating that the system was rigged against him and his pleas to supporters to mount patrols in swing states. A voters' rights protection hotline operated by the Lawyers' Committee for Civil Rights took more than 30,000 phoned complaints. There were reports that the voter-registration system in Colorado collapsed; of voting machine malfunctions in North Carolina; of a campaign of voter disinformation in Florida; of voters denied provisional ballots in Georgia; and of a measure of success in serial Republican voter suppression laws in various states – particularly in Texas, where there was great confusion on the types of photo ID that would-be voters were required to produce.

To the extent that campaigning is scientific, Clinton's was supposed to be a textbook operation – strong ground operations that outnumbered Trump by as much as five to one; tonnes more cash at bank; sophisticated data-mining; and speedier political recovery from self-inflicted and external crises – but by the end of the night shell-shocked Democratic strategists were picking through the ruins of two of their presumed electoral strengths – a better spread of support through the nation's demographics; and with that, control of the Electoral College. Trump, by contrast, could rarely see beyond the edge of the raucous crowds at his rallies; wasted time in unwinnable states; and for much of the campaign trained his fire on the wrong opponents – his own party, the women who accused him of sexual abuse, and ordinary Americans, like the family of a Muslim soldier who died heroically in Iraq. If Clinton was focused, Trump had difficulty judging the campaign's twists and turns, beyond the bruising of his own fragile ego. His inner sanctum adviser Roger Stone was addressing issues in Nevada, but he might as well have been talking of the whole campaign when he told Boston Herald Radio on Tuesday afternoon: "Frankly, Trump has run one of the worst campaigns in modern political history in the state." Or so we thought. A measure of the Trump team's shock at their own success was their quick resort to scapegoating as the first polls closed. Trump's campaign manager Kelly Anne Conway complaining on MSNBC that Trump was hurt by not having the full weight of the GOP establishment behind him – they're the people he kept insulting, personally and politically.

If Trump lost narrowly it would be "too bad" that "we had former presidents not voting for us, former nominees not voting for us", she said. "That's got to hurt." Early on Tuesday evening, when Trump might have been expected to be parsing an acceptance or concession speech, he was on radio, lashing out at George W Bush for invading Iraq and for not voting Trump; and at South Carolina Republican senator Lindsey Graham, one of the original contenders for the GOP's 2016 nomination, who also refused to vote Trump – "it's absolutely insane", Trump said. In a message to the nation, pre-recorded for BuzzFeed News, Obama urged Americans to remain engaged politically, urging kindness and a quest to build national strength from the divisiveness of the campaign just ended. In that laconic Obama way, the president signed off, assuring them that "the sun will rise in the morning and America will still be the greatest nation on Earth." Many were not sure that would be the case.

Vote Count How the votes were counted. The candidates needed 270 of 538 electoral votes to win. Donald Trump Kentucky

Alabama

West Virginia

Indiana

Oklahoma

South Carolina

Alabama

Tennessee

Texas

Wyoming

North Dakota

South Dakota

Nebraska

Kansas

Arkansas

Louisiana

Mississippi

Montana

Missouri

Ohio

Florida

North Carolina

Wisconsin

Utah

Iowa

Pennsylvania

Wisconsin Loading

Electoral votes: 276 (preliminary result) Hillary Clinton Washington D.C.

Rhode Island

Vermont

Maryland

Massachusetts

New Jersey

Delaware

Illinois

Connecticut

New York

New Mexico

Virginia

Colorado

California

Hawaii

Washington

Nevada

Maine Electoral votes: 218 (preliminary result) Live coverage: Who's winning the election