The stakes could not be higher. The North Koreans will soon have the capacity to attack the U.S. with a missile tipped with a nuclear warhead.

America needs to stop that happening. But any military exchange involving North Korea could kill millions and threaten a world war.

Surely this is a moment for steady, wise, clear-headed leadership. Fine. Except that the leaders in question are, on the one side, a narcissistic and power-crazed fantasist. And on the other, North Korea's President Kim Jong-un.

For better or worse, the biggest nuclear standoff since the Cuba missile crisis has come to a head on Donald Trump and Kim's watch. And neither man appears to be endowed with the wisdom of Solomon.

Donald Trump and Kim Jong Un are involved in the biggest nuclear standoff since the Cuba missile crisis. But could the President's unpredictability be key to unlocking the crisis?

So how frightened should we be? More pertinently, is the more powerful of the two men, Donald Trump, the right person for this job?

On the face of it the answer is pretty obvious. The 45th President is incapable of the tact required and the kind of high-pressure decisions he has to make.

An explosive new book about Trump's White House by journalist Michael Wolff has suggested his own staff think he is incompetent and possibly mad.

His foreign policy views are described as 'random, uninformed, and seemingly capricious'. He does not read. He knows no history. His tweet last week boasting that his nuclear button is 'much bigger and more powerful' than Kim's apparently sums up the depths of the man.

And yet another view is emerging. A view that doesn't seek to invest the President with hidden powers but simply suggests his unpredictability, recklessness and yes, even madness, could actually be the key to unlocking this crisis. A view that says perhaps, just perhaps, the maelstrom presidency of Donald J. Trump is going to save the world from nuclear disaster.

News this week that the North Koreans are sending athletes to the winter Olympics in South Korea next month could be a sign Donald Trump is winning his bizarre and scary war of words with Kim Jong-un.

The decision by the North Koreans to meet officials from the South, pictured, and send athletes to next month's winter Olympics could be a sign Trump is winning his war of words

The North Koreans, in other words, have blinked.

Yesterday the two countries held their first formal talks for more than two years and agreed to military talks in the future as well as the restoration of a 'military hotline' that's been closed since 2016. It is a dramatic and sudden change of tone from Pyongyang.

Power

Trump has been quick to take credit, of course. He tweeted that it would not have happened without him being 'firm, strong and willing to commit our total 'might' against the North'.

But the interesting thing is that it is not just Trump saying this. A calmer, more thoughtful voice is also suggesting it.

The North and South have restored their 'military hotline' in a dramatic change of tone from Pyongyang. Pictured is the Demilitarized Zone

John Everard, a former British Ambassador to North Korea, told CNN President Trump's unpredictability may have contributed to Pyongyang's decision to resume relations with the South.

'When United Nations Under-Secretary-General Jeffrey Feltman visited Pyongyang last month,' he explained, 'the North Koreans asked him repeatedly how decisions were made in Washington.

'They are nervous that the United States is now behaving in ways that they cannot predict and are probably anxious at President Trump's talk of military action.'

Moderate speech: Kim Jong-un made a statement that was shorter than usual recently, prompting questions that an attack on United States was cut at the last minute

Michael Wolff's book, with its title Fire And Fury reminding the North Koreans of the threat Trump made months ago to unleash America's military power on their heads, will only have compounded the sense of unease.

Everything in it suggests Donald Trump is deeply unpredictable. Capable of doing anything.

Former ambassador Everard makes the point that North Korea's economy is tottering and is affected by U.S- inspired sanctions.

He believes this, combined with Trump's bellicosity, might be getting to Kim Jong-un, who made a speech recently about the crisis that was more moderate and much shorter than usual, prompting Everard to wonder: 'were condemnations of the United States cut at the last minute?'

Having spent time in South Korea last year I am very aware this might be wishful thinking. The wonderful, vibrant South Korean capital of Seoul is a 40- minute drive from the border with North Korea. Pyongyang's field guns are pointed at its heart and ready to fire in minutes. On the Seoul tube there are emergency bunkers and first aid kits.

Impulsive

And since everyone knows war with the North would cause tens of thousands of deaths, it feels as if a threat from the U.S. to unleash that war could only be a bluff. The grim reality of mass casualties (including many Americans who live in Seoul) would surely stay the hand of any American president.

But in President Trump's case, maybe it wouldn't. And it's the 'maybe' that counts. For years America's North Korea policy — under Obama and under George Bush — was serious and stable. When I was based in Washington for the BBC I remember being lectured by the highly educated Obama state department team about how delicate a matter North Korea was. They would proceed with great caution, they said. At the time it felt impressive. But let's be honest, it was a disastrous failure.

North Korea developed its nuclear weapons programme while Barack Obama was the US President, not Donald Trump, suggesting a calm guy doesn't always get things right. Pictured are test lauches of the Hwasong-12, left, and Hwasong-14 missiles

Like so much of Obama's foreign policy it looked sophisticated and wise but fell apart in the real world.

It was under Obama, not Trump, that North Korea developed its weapons technology. Just as Syria went to hell under Obama. And relations with Russia collapsed. And Libya was ripped apart.

The calm guy doesn't always get things right. Rashness is not always the enemy of foreign policy success. When President Assad of Syria used chemical weapons against civilians Obama threatened action, then thought about it, then did nothing.

Trump — faced with the same thing last year — blasted an airfield with cruise missiles. People were terrified. What would happen next? What would Syria's allies, the Russians, do?

Donald Trump threatened action in Syria if President Assad used chemical weapons against civilians and followed his word. Since then the government has made no further large-scale chemical attack

It turns out the Russians did nothing and the Assad government has made no further large-scale chemical weapons attack.

Trump gets no credit for this but if you were his enemy, you would feel discomfited by his impulsive behaviour. Which is no bad thing.

The British historian Niall Ferguson points out that Donald Trump is oddly like a president the liberal Left have long believed to be a demi-god, an icon of fine judgment and decency — John F. Kennedy.

Seriously? Wasn't Kennedy brilliant and handsome? Well, yes. But he was also a serial abuser of women, a man with connections to organised crime, a man who hid his medical problems even when they affected his mental state.

A British historian has said that Donald Trump's foreign policy is similar to that of John F Kennedy

And in foreign policy, Ferguson points out, 'Kennedy combined callousness with recklessness. His questionable interventions ranged from an abortive invasion of Cuba to a bloody coup d'état in South Vietnam. On his watch, the Central Intelligence Agency sought to assassinate Fidel Castro using Mafia hit-men'.

It makes Trump look almost tame.

Missiles

Of course the Cuba missile crisis — when U.S. ships blockaded Soviet-occupied Cuba to stop the Soviets' plan to place nuclear missiles there — ended with the world still in one piece. But only after risks were taken and war narrowly averted.

I accept that just because brinkmanship worked then, does not mean it will work now. It could have gone wrong under Kennedy and let's be blunt, it could go wrong under Trump.

But what if it goes right? If there are talks between North and South Korea that eventually broaden out to include China, the U.S. and Russia, and reach some kind of arrangement that buys off the North Koreans and reduces the threat to America?

What if Trump and Kim Jong-un sit down together to see who really is crazier. What if they actually got along?

A joint Nobel peace prize: Kim Jong-un and Donald Trump. Don't rule it out. The modern world is a strange and unpredictable place. And the alternatives to a peaceful outcome are too terrible to think about.