The Pentagon’s top general was so worried in early January that Donald Trump was out of control that he took secret action to prevent the then-US president from sparking a war with China, according to a new book.

Joint Chiefs Chair General Mark Milley ordered aides to not act immediately on any move by Trump to use US nuclear forces, and he called a Chinese general to reassure Beijing, presidential chronicler Bob Woodward and co-author Robert Costa wrote in their soon-to-be-released book.

The Washington Post – Woodward’s and Costa’s employer – and CNN on September 14 reported excerpts from the book Peril, depicting Milley as organising the Pentagon and intelligence community to resist any move by Trump to ratchet up tensions with China after he lost the November 2020 presidential election.

Milley called Chinese counterpart General Li Zuocheng twice, on October 30 just before Trump’s election defeat, and on January 8, two days after Trump supporters attacked the US Capitol, to reassure him that Trump’s anti-China rhetoric could not translate into military action.

“General Li, I want to assure you that the American government is stable and everything is going to be okay,” Milley told Li in the October call, Woodward and Costa write.

“We are not going to attack or conduct any kinetic operations against you,” Milley said.

Two months later, Milley used the secret back-channel with Li again after the US Capitol riot, amid concerns both in Beijing and Washington that Trump was unstable.

“We are 100 per cent steady. Everything’s fine. But democracy can be sloppy sometimes,” Milley told Li, according to the book.

To reassure the Chinese, Milley went so far as to have the Pentagon’s Indo-Pacific Command postpone military exercises that Beijing might have viewed as a possible threat.

Separately, Milley told his top staff that if Trump sought to exercise his power to order a nuclear strike, that they had to inform him first.

And Milley discussed with other top officials, including Central Intelligence Agency (CIA) director Gina Haspel and National Security Agency (NSA) head Paul Nakasone, the need to be vigilant amid concerns Trump could act irrationally.

“Some might contend that Milley had overstepped his authority and taken extraordinary power for himself,” the authors wrote.

But he believed he was acting correctly “to ensure there was no historic rupture in the international order, no accidental war with China or others, and no use of nuclear weapons”, they said.

The Pentagon declined to comment on the book’s claims.