Donald Trump called for the population of Seoul to be moved during an Oval Office meeting when tensions between the US and North Korea were at their height, according to a new book about the president’s relations with the US military.

In Trump and his Generals: The Cost of Chaos, the national security and counter-terrorism expert Peter Bergen also gives new details of Trump’s demands that the families of US service members in South Korea be evacuated, which the North Korean regime would have interpreted as a clear move towards war. In both cases, Trump’s impetuous diktats were ignored by his top officials.

Bergen’s book, the latest in a string of accounts of the president’s erratic leadership on national security issues, is being published on Tuesday at a time when friction between Washington and Pyongyang is once more on the rise, after more than 18 months of detente and summitry. The North Korean leadership is threatening a resumption of missile tests, and a war of words between Trump and Kim Jong-un is simmering once more.

Trump has resurrected his nickname for Kim, “Rocket Man”. North Korea conducted a missile engine test at a site that it had previously mothballed, and on Monday a senior regime official called the US president a “heedless and erratic old man”.

The level of mutual hostility is still some way off from the worst period in 2017 when a conflict looked a real possibility.

In his book, Bergen – a vice-president of the New America thinktank – describes an Oval Office meeting on North Korea in mid-April 2017, after a string of North Korean missile tests. Trump’s top national security officials were present and the National Geospatial-Intelligence Agency had made a model of a secret North Korean facility the size of coffee table, to illustrate the regime’s covert programmes.

According to Bergen, Trump was also shown a satellite image of the Korean peninsula at night, showing the lights of China and South Korea and the blackness of North Korea in between. Trump initially mistook the void for an ocean. When he was shown the bright lights of Seoul just 30 miles south of the demilitarized zone separating the two Koreas, the president asked: “Why is Seoul so close to the North Korean border?”

Trump reportedly asked why Seoul, the capital of South Korea, was so close to the North Korean border. Photograph: Alamy

Trump had been repeatedly told that US freedom of action against North Korea was constrained by the fact that the regime’s artillery could demolish the South Korean capital in retaliation for any attack, inflicting mass casualties on its population of 25 million.

“They have to move,” Trump said, according to Bergen, who adds that his officials were initially unsure if the president was joking. But Trump then repeated the line. “They have to move!”

No action was taken in response to Trump’s bizarre remark, but the situation grew steadily worse, with a series of North Korean intercontinental ballistic missile tests and a hydrogen bomb test in September 2017.

After watching a retired four-star general, Jack Keane, interviewed on Fox News in late January 2018, saying that US troops deployed to South Korea should not take their families with them, Bergen reports that Trump told his national security team: “I want an evacuation of American civilians from South Korea.”

A senior official warned that such an evacuation would be interpreted as a signal that the US was ready to go to war, and would crash the South Korean stock market, but Trump is reported to have ignored the warning, telling his team: “Go do it!”

Alarmed Pentagon officials ignored the order, and – according to Bergen – Trump eventually dropped the idea. It was one of a number of occasions that the defense secretary at the time, James Mattis, ignored direction from the White House. He also refused to send defense department officials to a planned Korea war game at Camp David in the autumn of 2017, or to provide military options for intercepting North Korean ships suspected of sanctions busting.