President Donald Trump meets with North Korean leader Kim Jong Un on Sentosa Island, Tuesday, June 12, 2018, in Singapore - AP

Donald Trump nearly started a conflict with North Korea in early 2018, when he proposed a tweet that "scared the daylights" out of his defence secretary James Mattis, a new book claims.

“This is all about leader versus leader,” said Mr Trump, according to Fear, an upcoming book by legendary Watergate journalist Bob Woodward seen by the Telegraph. “Man versus man. Me versus Kim.”

Woodward reveals that Mr Trump wanted to send a tweet ordering US military dependents – thousands of family members of 28,500 troops - to leave South Korea.

It sent his national security staff into panic mode. A senior figure in the North Korean politburo had already signalled to them that any evacuation would be interpreted in Pyongyang as a precursor to military attack.

Knowing that, Mr Trump’s tweet would effectively be a declaration war and could have provoked Kim into attacking South Korea. The tweet was never sent.

The book also reveals that Mr Trump decided early in his presidency that the United States would stay in Nato, but told Mr Mattis to become its "rent collector".

Following a crunch meeting at the White House, to decide whether Mr Trump was "in or out" of the alliance, the president was persuaded and told Mr Mattis: "You can have your Nato."

According to the book Mr Trump's doctor had the president's schedule cut back because of "stress".

The cover of Bob Woodward's 448-page book on Donald Trump Credit: Simon & Schuster

And a picture emerged of Melania Trump as a key, and tough, behind-the-scenes player, with one senior adviser describing her as like a "hammer".

The dinner meeting to decide Nato policy was convened in the Red Room of the White House at 6.30pm on Feb 8, 2017 by then chief of staff Reince Priebus. US policy had to be settled ahead of a speech by Mr Mattis in Munich a week later.

Mr Trump insisted on talking about the gossip of the day, until dessert, when Mr Priebus said "We've really got to deal with the Nato issue."

Retired general Keith Kellogg, the National Security Council chief of staff, argued Nato was "obsolete" and the US was being "used" by allies. Mr Mattis and Joseph Dunford, chairman of the joint chiefs of staff, argued in favour of Nato, according to the book.

Story continues

James Mattis said if Nato didn't exist it would have to be invented Credit: AFP

Jared Kushner, the president's son-in-law, also interjected, saying the US was only losing "pennies on the dollar" in supporting Nato.

Mr Mattis expressed confidence Germany would meet the target of paying two per cent of GDP on defence.

He added: "If you didn't have Nato you would have to invent it. There's no way Russia could win a war if they took on Nato."

At the end of the dinner Mr Trump told Mr Mattis the US would support Nato but allies must pay.

He told Mr Mattis: "You can have your Nato. But you become the rent collector." Mr Mattis reportedly laughed and nodded.

During the same meeting Mr Trump reportedly asked C. Boyden Gray, former US ambassador to the EU: "Which is going to be the next country to drop out (of the EU after Brexit)?"

Mr Gray said he did not think there would be another one. Mr Trump said he agreed.

The prospect of conflict with North Korea reportedly came closest early this year when Mr Trump proposed sending a tweet ordering home families of the 28,500 US military personnel stationed in South Korea.

North Korea had previously made clear it would regard such a move as a sign of imminent attack.

Mr Trump's planned tweet was considered "almost unthinkable" by aides, Mr Woodward wrote.

The president later raised the idea with Lindsey Graham, the Republican senator with whom he plays golf.

Mr Graham reportedly told him: "That if s a big frigging deal. Mr President, I don't think you should ever start this process unless you are ready to go to war."

According to the book Rear Admiral Ronny Jackson, Mr Trump's doctor until earlier this year, repeatedly advised John Kelly, his chief of staff, to "dial back" the president's schedule because he was "under stress".

Mr Kelly responded by introducing more non-specific "executive time" on the schedule, the book said,

People close to the first couple told Woodward there was "sincere affection" in the relationship, they ate dinner together at times, but Mrs Trump "operated independently".

Steve Bannon, Mr Trump's former chief strategist, was quoted as saying: "Behind the scenes she's a hammer."

He believed Mrs Trump had the most influence with the president of anyone, identifying who was telling her husband the truth, and who was "sucking up".

She was "obsessed" with raising their son Barron, and that was "her focus 100 per cent," one insider told Woodward.

:: Fear: Trump in the White House by Bob Woodward is published by Simon & Schuster on September 11.