Boris Johnson has said the option of military action against North Korea “must theoretically remain on the table” in discussions about the country’s nuclear crisis.

Speaking at Chatham House, the Foreign Secretary said it was “the duty” of US President Donald Trump to keep available the possibility of a pre-emptive strike against Kim Jong-un’s regime.

“It is the duty of any president of the US given the threat that his or her country could face from a nuclear-armed North Korea, it is the duty of the President at least to explore those military options and keep them on the table,” he said.

Asked whether Britain would support a pre-emptive strike against North Korea, and if it was time the world accepted the hermit nation as among the club of nuclear states, Mr Johnson stressed that he preferred the “productive avenue” of talks orchestrated by China.

“I don’t think anybody can conceivably want a military solution to this problem, and I know many who have studied the matter find it hard to see how the military solution might play out,” he said.

“And yet clearly it must remain on the table. The possibility of some kind of military option – there is a spectrum of things that could be done – that possibility must theoretically remain on the table.”

Comparing the situation to the Cold War, the Foreign Secretary said: “The public can be forgiven for genuinely starting to wonder whether the nuclear sword of Damocles is once again held over the head of a trembling human race.”

In a speech to the Chatham House foreign affairs think tank, Mr Johnson said the Pyongyang regime’s nuclear ambitions would not make the country safer.

“No one wants any kind of military solution to the problem,” he said.

“But Kim and the world need to understand that when the 45th President of the United States contemplates a regime led by a man who not only threatens to reduce New York to ‘ashes’, but who stands on the verge of acquiring the power to make good on his threat, I am afraid that the US president – whoever he or she might be – will have an absolute duty to prepare any option to keep safe not only the American people but all those who have sheltered under the American nuclear umbrella.

“And I hope Kim will also consider this: that if his objective is to intimidate the US into wholesale withdrawal from East Asia, then it strikes me that his current course might almost be designed to produce the opposite effect.”

Mr Johnson’s intervention comes amid concern at what has been seen as inflammatory rhetoric being traded by Mr Trump and Mr Kim, who the President describes as “Rocket Man”.

It also comes after Mr Trump decertified the 2015 pact with Iran, complaining his predecessor Barack Obama was taken advantage of in negotiations, and last week repeated his threat to pull out of the landmark deal entirely.

Giving a speech at Chatham House’s conference in central London, the Foreign Secretary said the Iran deal proved crucial at a time when the country had been “only months away” from producing a nuclear weapon, which could have triggered an arms race in “one of the most volatile regions of the world”.

“Think of the nightmare that deal has avoided,” he said.

Mr Johnson said Mr Trump had not “junked” the deal and with “determination and courage” the joint comprehensive plan of action deal could be preserved.

He acknowledged concerns about Iran’s support for Hezbollah, its supply of weapons to Houthi rebels in Yemen and interference in Syria.

“But that does not mean for one minute that we should write Iran off, or that we should refuse to engage with Iran or that we should show disrespect to its people,” he said.

“On the contrary, we should continue to work to demonstrate to that population that they will be better off under this deal and the path of re-engagement that it prescribes.”