THE race for the White House was too close to call as Donald Trump was accused of destroying democracy by falsely claiming victory before several US states had announced their results.

Early Wednesday, the President, amid a backdrop of American flags, sparked outrage after he warned of a “fraud on the American nation,” vowing to go to the US Supreme Court - now with a conservative majority - to get vote counting stopped but without any evidence of wrongdoing.

He then declared to cheers from supporters: “We were getting ready to win this election; frankly, we did win this election.”

Democrat HQ condemned the “outrageous” remarks, saying they were “a naked effort to take away the democratic rights of American citizens” and insisted the “counting will not stop”.

Joe Biden declared that he was “on track to win” but also stressed every vote had to be counted. His campaign made clear its legal teams were ready to fight any court challenge and “they will prevail”.

The 2020 contest looked like being the most litigious in US history with an estimated 300 lawsuits having been filed.

In Edinburgh, Nicola Sturgeon said she had listened to the President’s remarks with a “sense of discomfort and foreboding” and insisted counting all the votes was an important democratic principle.

“I hope sensible voices in America come to the fore in terms of the protection of the integrity of democracy; whatever the direction the final few state tallies take us in,” added the First Minister.

During Prime Minister’s Questions, Keir Starmer urged Boris Johnson to join him in saying it was not up to Mr Trump to say when votes should stop being counted, noting: “The next president must be the free and fair choice of the American people.”

But the PM declined the Labour leader’s invitation, telling MPs: “Of course, we don’t comment as a UK Government on the democratic processes of our friends and allies.”

This led Angela Rayner, the deputy Labour leader, to rebuke Mr Johnson, tweeting that his response was “one of the most cowardly statements I've ever heard #PMQs”.

Earlier, Dominic Raab, the Foreign Secretary, also refused to be “sucked in” to the row over the President’s words, saying: “We need to be patient and wait and see who wins the US election.”

He stressed that it was “important the process is given sufficient time to reach a conclusion but we have full confidence in the checks and balances of the US system to produce a result”.

Mr Raab made clear the special relationship with the US would endure whoever won the bitterly contested American election.

However, his predecessor at the Foreign Office, Jeremy Hunt, had no qualms in expressing alarm at Mr Trump’s controversial remarks.

“My biggest worry is that we forget that the US is the leading democracy in the world and if we end up with a huge argument about process, and people talking about a stolen elections left, right and centre, we are only going to put a smile on the face of people like President Putin and President Xi who will look at their own people and say: ‘Are you not pleased we have not got any of this mess?’ and that would be an absolute disaster.

“We must remember that the reputation of democracy across the world is at stake here,” he said.

Later, Mr Hunt, who lost to Mr Johnson in last year’s Conservative leadership contest, tweeted: “Dear American friends the reputation of democracy is at stake and the world is watching. Please proceed carefully.”

But Mr Trump received support from Janez Jansa, the right-wing populist Prime Minister of Slovenia, who tweeted: “It’s pretty clear American people have elected @realDonaldTrump @Mike_Pence for #4moreyears.”

He added: “More delays and facts denying from #MSM (mainstream media), bigger the final triumph for #POTUS. Congratulations @GOP for strong results across the #US.”

With just a few swing states to fully declare their result Democrat HQ was privately confident of victory. By 9pm Mr Biden was projected to have 248 votes in the electoral college against Mr Trump’s 214; 270 is the magic number to secure a victory.

Jennifer O’Malley Dillon, Mr Biden’s campaign manager, said: "We expect that the vice president will have leads in states that put him over 270 electoral votes today."

With narrow leads in Michigan and Nevada, the Democrat camp claimed it had won the key Mid-West state of Wisconsin, which has 10 electoral college votes. But the Trump campaign quickly announced it would demand a recount as Mr Biden’s lead was only around 20,000 votes and there were “reports of irregularities”.

The President took to Twitter to cast doubt on the counting, saying: “They are working hard to make up 500,000 vote advantage in Pennsylvania disappear - ASAP. Likewise, Michigan and others!” Further close results are almost certain to spark more recounts.

With Pennsylvania, a key swing state with 20 electoral votes, set to declare a result on Friday, Rudi Guiliani, the President’s personal lawyer, ahead of a hastily arranged press conference tweeted: “En route to Philadelphia with legal team. Massive cheating. @realDonaldTrump up by 550,000 with 75% counted. Will not let Philly Democrat hacks steal it!”

Preliminary estimates put the turn-out at 67 per cent, the highest in 120 years with more than 160 million Americans casting a vote.

Meanwhile, the Democrats look set to extend their control of the House of Representatives for two more years but with a potentially shrunken majority while the Republicans seem certain to hold onto control of the Senate.