Mark Milley feared that Trump could "go rogue" after the Jan. 6 Capitol riot.
WASHINGTON -- President Donald Trump's senior military adviser took secret precautions to prevent Trump from being able to launch a nuclear weapon or taking military action after the Jan. 6 Capitol riot, according to a new book.
Army Gen. Mark Milley, the chairman of the Joint Chiefs of Staff and the president's top military aide, feared that Trump could "go rogue" after the Jan. 6 Capitol riot, and worried that he could stoke military conflict to cling to power and derail the peaceful transfer of power, Washington Post reporters Bob Woodward and Robert Costa write in "Peril."
Milley "was certain that Trump had gone into a serious mental decline" after the election and had become "manic, screaming at officials and constructing his own alternate reality about endless election conspiracies," they wrote in the new book, obtained by ABC News ahead of its Sept. 21 release.
On Jan. 8, two days after the assault on the Capitol by pro-Trump rioters, Milley called his Chinese counterpart, Gen. Li Zuocheng, to assure him that the United States was "100 percent steady" and not on the brink of collapse or war despite the unrest in Washington, according to the book. He reportedly did not tell Trump about the call.
He placed a similar call in October, according to the book, to allay Chinese fears that Trump was planning a secret attack ahead of the presidential election.
That same day, Milley also convened an unscheduled meeting at the Pentagon with military officials responsible for relaying orders for a military or nuclear strike. He made clear that he "must be directly involved" with the process of launching a nuclear weapon, Woodward and Costa wrote.
"No matter what you are told, you do the procedure. You do the process. And I'm part of that procedure," Milley told the officers as he looked them in the eye and asked them to affirm their understanding, according to the book.
"Some might contend Milley had overstepped his authority and taken extraordinary power for himself," Woodward and Costa wrote. "But his actions, he believed, were a good faith precaution to ensure there was no historic rupture in the international order, no accidental war with China or others, and no use of nuclear weapons."
Milley was not the only senior Trump administration official worried about Trump's behavior and the potential national security implications. CIA Director Gina Haspel also worried that Trump would attack Iran after he declined to rule out military action over its nuclear program in November, the authors wrote.
"This is a highly dangerous situation. We are going to lash out for his ego?" Haspel said to Milley in a phone call, according to the book.
Haspel also reportedly told Milley that the country was "on the way to a right-wing coup" after Trump refused to concede to Joe Biden in November.
"The whole thing is insanity. He is acting out like a six-year-old with a tantrum," she said, according to the book.
Woodward and Costa said they conducted more than 200 interviews for their book on "deep background," with the condition that the firsthand participants and witnesses to the events described not be named as sources for the project.
They also wrote that they obtained extensive contemporaneous notes and documents in their report, including a full transcript of Milley's call with Speaker Nancy Pelosi, D-Calif., after the Jan. 6 Capitol attack, when she inquired about nuclear safeguards.
"What precautions are available to prevent an unstable president from initiating military hostilities or from accessing the launch codes and ordering a nuclear strike?" Pelosi asked Milley, who told her there were "a lot of checks in the system."
Pelosi was skeptical, according to the book, pointing to the Capitol riot and the lack of intervention from the White House.
"You know he's crazy. He's been crazy for a long time," Pelosi said, according to the book.
"Madam Speaker, I agree with you on everything," Milley replied, the authors wrote.
Milley, through a spokesman, declined to comment and a spokesperson for Pelosi did not respond to a request for comment from ABC News.
In an interview with conservative television network Newsmax on Tuesday evening, Trump said he never considered attacking China and said Milley's reported call with his Chinese counterpart was "treason." Sen. Marco Rubio, R-Fla., the chairman of the Senate Intelligence Committee, called on Biden to fire Milley, who now serves as his top military adviser.
"Peril," a follow-up to Woodward's earlier books about the Trump administration, "Fear" and "Rage," include new details of efforts inside the Trump White House and administration to challenge the results of the 2020 election.
Trump, who lashed out at Cabinet secretaries who acknowledged the incoming Biden administration, also pressured Vice President Mike Pence to overturn the election results in an Oval Office meeting on Jan. 5.
"I've done everything I could, and then some, to find a way around this. It's simply not possible," Pence told Trump about his ceremonial role presiding over the electoral vote count, according to the book.
"No, no, no!" Trump shouted back. "You don't understand, Mike. You can do this. I don't want to be your friend anymore if you don't do this."
Pence confided in former Vice President and Indiana Sen. Dan Quayle about his role, and asked if there was anything he could do to do as Trump had ordered, the authors recounted.
"You don't know the position I'm in," Pence told Quayle.
"I do know the position you're in," Quayle replied, according to the book. "I also know what the law is. You listen to the parliamentarian. That's all you do. You have no power."
In "Peril," Woodward and Costa also explore Biden's decision to run for president and the behind-the-scenes machinations of his campaign to win the Democratic nomination and face Trump.
ABC News' Luis Martinez and Will Steakin contributed to this report.