THERE is an air of cautious optimism among Democrats and their liberal supporters in the dying days of the most bitter presidential election America has experienced. But no one is writing off Donald Trump. Like experts, the opinion polls are simply not believed any more. So, what’s the worst that could happen?

After President Trump took the oath of office might navy seals arrive at dead of night to take out opponents of The Donald’s golfing projects in the Menie Estate? It is to be hoped not but the Republican President’s enthusiasm for litigation is unlikely to disappear just because he is in the White House. He or his sons might even try to revive his failed legal bit to halt the offshore wind farm he says is destroying the view.

Nicola Sturgeon made clear her distaste for the misogynist Republican candidate by removing his status as a “Global Scot” business ambassador so she’s unlikely to be graced by a victory visit, despite Mr Trump’s claim of Scottish ancestry.

Read more: US presidential election - How it works

However, since Scotland hosts America’s nuclear arsenal on the Clyde, President Trump might just decide to come here to throw his weight around and intimidate Alex Salmond, whom he loathes.

Back home, the US constitution’s checks and balances should halt many of Mr Trump’s wilder schemes, like the 1,000-mile wall on the Mexican border. He says the “beautiful wall” will cost $12 billion but more realistic estimates put it at $25bn.

The expulsion of 11 million illegal immigrants would also involve unimaginable cost, not to mention social unrest. Congress would almost certainly try to block the project. This would damage the US economy, in which Hispanic workers are a mainstay.

Congress would also presumably frustrate his ambition to abolish the North American Free Trade Area and slap 35 per cent tariffs on imported goods; similarly with his attempt to force companies such as Apple and Ford to close their factories abroad and repatriate manufacturing jobs to the US.

The economy doesn’t work like that any more. Even if Mr Trump could repatriate some of Apple’s profits, it isn’t possible to repatriate the global supply chains involving countries including Taiwan, South Korea and China where products such as iPhones are made. Mr Trump would abolish Obama care but he would be hard put to find an alternative that would be cheaper and prevent tens of millions going without health insurance.

Read more: US presidential election - How it works

These domestic political frustrations would mean Mr Trump’s belligerence would probably be turned outwards towards international affairs, targeting groups such as so-called Islamic State and countries such as Iran. This, of course, is exactly what Islamic terrorists want him to do. His ban on Muslims coming to America lent credence to the fundamentalists’ claim that America was racist and militantly anti-Muslim.

Mr Trump seems to like the cut of Vladimir Putin’s jib (it takes one to know one) so there is a possibility of rapprochement there, and perhaps joint action against Islamic terrorists in Syria. Mr Trump’s pledge to pull out of Nato, or refuse to finance it, would help the Russian leader’s efforts to assert his nation’s interest on the international stage. Eastern European and Baltic states will feel the heat and might start building military walls of their own.

Nowadays, America’s main strategic challenge comes from south-east Asia rather than Europe. Mr Trump is likely to increase tensions in the South China Seas where the Chinese state has allegedly been building artificial islands to promote territorial ambitions. If America launches a trade war against China, then all hell could break loose.

President Trump will be in possession of the codes that can start a nuclear war. We can only hope that the self-styled “virtuoso of the deal” will regard thermo-nuclear obliteration as bad for business and that he’ll be more circumspect in office.

But the risks are great. America avoided succumbing to extreme nationalism in the 1930s when Europe was seized by fascism, Stalinism and National Socialism. We thought it was because America was too advanced for such political primitivism.

Read more: US presidential election - How it works

But what the Trump candidacy suggests – even though he will probably lose tonight – is that America has yet to learn just how dangerous these political passions are.

Now that America has come within a hair’s breadth of electing a leader whose economic and racial philosophy resembles that of Benito Mussolini, the world may never quite regain the respect it formerly had for the US as the planet’s greatest and most secure democracy.

Anyway, The Donald, already crying foul, is unlikely to go quietly.