Editor's Note: (The story below contains explicit language)
Washington(CNN) Two days after the January 6 attack on the US Capitol, President Donald Trump's top military adviser, Joint Chiefs Chairman Gen. Mark Milley, single-handedly took secret action to limit Trump from potentially ordering a dangerous military strike or launching nuclear weapons, according to "Peril," a new book by legendary journalist Bob Woodward and veteran Washington Post reporter Robert Costa.
Woodward and Costa write that Milley, deeply shaken by the assault, 'was certain that Trump had gone into a serious mental decline in the aftermath of the election, with Trump now all but manic, screaming at officials and constructing his own alternate reality about endless election conspiracies.'
Milley worried that Trump could 'go rogue,' the authors write.
"You never know what a president's trigger point is," Milley told his senior staff, according to the book.
In response, Milley took extraordinary action, and called a secret meeting in his Pentagon office on January 8 to review the process for military action, including launching nuclear weapons. Speaking to senior military officials in charge of the National Military Command Center, the Pentagon's war room, Milley instructed them not to take orders from anyone unless he was involved.
"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, according to the book. He then went around the room, looked each officer in the eye, and asked them to verbally confirm they understood.
"Got it?" Milley asked, according to the book.
'Milley considered it an oath,' the authors write.
"Peril" is based on more than 200 interviews with firsthand participants and witnesses, and it paints a chilling picture of Trump's final days in office. The book, Woodward's third on the Trump presidency, recounts behind-the-scenes moments of a commander in chief unhinged and explosive, yelling at senior advisers and aides as he desperately sought to cling to power.
It also includes exclusive reporting on the events leading up to January 6 and Trump's reaction to the insurrection, as well as newly revealed details about Trump's January 5 Oval Office showdown with his vice president, Mike Pence.
Woodward and Costa obtained documents, calendars, diaries, emails, meeting notes, transcripts and other records.
The book also examines Joe Biden's decision to run for office again; the first six months of his presidency; why he pushed so hard to get out of Afghanistan; and how he really feels about Trump. CNN obtained a copy of "Peril" ahead of its release on September 21.
Milley's fear was based on his own observations of Trump's erratic behavior. His concern was magnified by the events of January 6 and the 'extraordinary risk' the situation posed to US national security, the authors write. Milley had already had two back-channel phone calls with China's top general, who was on high alert over the chaos in the US.
Then Milley received a blunt phone call from House Speaker Nancy Pelosi, according to the book. Woodward and Costa exclusively obtained a transcript of the call, during which Milley tried to reassure Pelosi that the nuclear weapons were safe.
Pelosi pushed back.
"What I'm saying to you is that if they couldn't even stop him from an assault on the Capitol, who even knows what else he may do? And is there anybody in charge at the White House who was doing anything but kissing his fat butt all over this?"
Pelosi continued, "You know he's crazy. He's been crazy for a long time."
According to Woodward and Costa, Milley responded, "Madam Speaker, I agree with you on everything."
After the call, Milley decided he had to act. He told his top service chiefs to watch everything "all the time." He called the director of the National Security Agency, Paul Nakasone, and told him, "Needles up ... keep watching, scan." And he told then-CIA Director Gina Haspel, "Aggressively watch everything, 360."
The authors write, 'Milley was overseeing the mobilization of America's national security state without the knowledge of the American people or the rest of the world.'
Woodward and Costa also write that 'some might contend that Milley had overstepped his authority and taken extraordinary power for himself,' but he believed his actions 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's fear that Trump could do something unpredictable came from experience. Right after Trump lost the election, Milley discovered the President had signed a military order to withdraw all troops from Afghanistan by January 15, 2021, before he left the White House.
The memo had been secretly drafted by two Trump loyalists. No one on the national security team knew about it, according to the book. The memo was eventually nullified, but Milley could not forget that Trump had done an end run around his top military advisers.
Woodward and Costa write that after January 6, Milley 'felt no absolute certainty that the military could control or trust Trump and believed it was his job as the senior military officer to think the unthinkable and take any and all necessary precautions.'
Milley called it the 'absolute darkest moment of theoretical possibility,' the authors write.
"Peril" is one of several books released this year that have documented the tumultuous final days of Trump's presidency. In "I Alone Can Fix It," Washington Post reporters Phil Rucker and Carol Leonnig detailed how Milley discussed a plan with the Joint Chiefs to resist potential illegal orders from Trump amid fears that he or his allies might attempt a coup.
Woodward and Costa write that top national security officials were worried Trump might pull a "Wag the Dog" -- provoking a conflict domestically or abroad to distract from his crushing election loss.
When Trump refused to concede in November 2020, Haspel warned Milley, "We are on the way to a right-wing coup. The whole thing is insanity. He is acting out like a six-year-old with a tantrum." Haspel also worried that Trump would try to attack Iran.
"This is a highly dangerous situation. We are going to lash out for his ego?" she asked Milley, according to the book.
Even some of Trump's most loyal advisers privately expressed concern after the election. Then-Secretary of State Mike Pompeo told Milley that Trump was "in a very dark place right now."
Milley had just one goal: ensuring a peaceful transfer of power on January 20. As he told Pompeo, "We've got a plane with four engines and three of them are out. We've got no landing gear. But we're going to land this plane and we're going to land it safely."
"Peril" offers a behind-the-scenes account of Trump's refusal to concede the election and how those around him tried -- and failed -- to contain his desperation.
On November 4, the day after the election, Trump seemed privately ready to acknowledge defeat, asking adviser Kellyanne Conway, "How the hell did we lose the vote to Joe Biden?" But after making phone calls to loyalists, including Rudy Giuliani, Trump embraced the false and damaging conspiracy theories of election fraud.
Jared Kushner and Ivanka Trump took a light touch, the authors write, and Kushner told aides he did not want to be the point person for an intervention. Then-Attorney General William Barr tried to talk sense into Trump, telling him the claims of fraud were bogus. "The problem is this stuff about the voting machines is just bullshit," Barr said, according to the book.
"Your team is a bunch of clowns," he told Trump.
According to the book, a key figure from Trump's earliest days as president reemerged: former White House adviser Steve Bannon. The authors write that Bannon, who had been indicted in April 2020 and later pardoned by Trump, played a critical role in the events leading up to January 6.
On December 30, Bannon convinced Trump to come back to the White House from Mar-a-Lago to prepare for the events of January 6, the date Congress would certify the election results.
"You've got to return to Washington and make a dramatic return today," Bannon told Trump, according to the book. "You've got to call Pence off the fucking ski slopes and get him back here today. This is a crisis."
The authors write that Bannon told Trump that January 6 was "the moment for reckoning."
"People are going to go, 'What the fuck is going on here?' " Bannon believed. "We're going to bury Biden on January 6th, fucking bury him," Bannon said.
"Peril" also describes the tense encounter in the Oval Office on January 5 when Trump pressured Pence to overturn the results of the election. While the showdown went on inside, the two men could hear MAGA supporters cheering and chanting outside near Pennsylvania Avenue.
"If these people say you had the power, wouldn't you want to?" Trump asked.
"I wouldn't want any one person to have that authority," Pence said.
"But wouldn't it be almost cool to have that power?" Trump asked, according to Woodward and Costa.
"No," Pence said. He went on, "I've done everything I could and then some to find a way around this. It's simply not possible."
When Pence did not budge, Trump turned on him.
"No, no, no!" Trump shouted, according to the authors. "You don't understand, Mike. You can do this. I don't want to be your friend anymore if you don't do this."
Trump called Pence again the morning of January 6. "If you don't do it, I picked the wrong man four years ago," Trump said, according to the authors. "You're going to wimp out," he said, his anger visible to others in the office.
Even though Pence stood up to Trump in the end, "Peril" reveals that after four years of abject loyalty, he struggled with the decision. Woodward and Costa write that Pence reached out to Dan Quayle, who had been the vice president to George H.W. Bush, seeking his advice.
Over and over, Pence asked if there was anything he could do.
"Mike, you have no flexibility on this. None. Zero. Forget it. Put it away," Quayle told him.
Pence pressed again.
"You don't know the position I'm in," he said, according to the authors.
"I do know the position you're in," Quayle responded. "I also know what the law is. You listen to the parliamentarian. That's all you do. You have no power."
According to the authors, Trump ignored repeated requests by both staff and his daughter Ivanka Trump to call off the rioters at the Capitol on January 6.
In one episode, retired Gen. Keith Kellogg, who served as Pence's national security adviser, was in the White House with Trump while he watched the insurrection unfold on television.
Kellogg urged Trump to act.
"You really should do a tweet," Kellogg said, according to the authors. "You need to get a tweet out real quick, help control the crowd up there. This is out of control. They're not going to be able to control this. Sir, they're not prepared for it. Once a mob starts turning like that, you've lost it."
"Yeah," Trump said. The authors write, 'Trump blinked and kept watching television.'
Ivanka Trump also repeatedly tried to intervene, talking to her father three times. "Let this thing go," she told him. "Let it go," she said, according to the book.
Woodward's previous book on Trump was called "Rage," but "Peril," filled with expletive-laced shouting matches, takes the rage up a notch.
Top officials told the authors that Trump's outbursts reminded them of "Full Metal Jacket" at times and "Doctor Strangelove" at others.
In June 2020, after Black Lives Matter protests near the White House, Trump lit into then-Defense Secretary Mark Esper, who had just announced at a news conference that he opposed invoking the Insurrection Act in response to the protests.
"You took away my authority!" Trump screamed at Esper in the Oval Office. "You're not the president! I'm the goddamn president."
But Trump wasn't done, according to the book, turning to the rest of his team in the room. "You're all fucked up," he yelled. "Everybody. You're all fucked. Every one of you is fucked up!"
In the aftermath of the election, Trump's rage was directed at Barr for daring to even mention the incoming Biden administration.
"First part of the Biden administration!" Trump shouted, according to the authors. Trump was so mad, Barr thought, 'if a human being can have flames come out of his ears, this was it,' Woodward and Costa write.
The book also reveals that Trump is still angry with Republicans who blamed him for the insurrection, including House Minority Leader Kevin McCarthy.
"This guy called me every single day, pretended to be my best friend, and then, he fucked me. He's not a good guy," Trump said, according to the book.
"Kevin came down to kiss my ass and wants my help to win the House back," Trump said, according to the authors.
The book ends with Trump allies speculating about his plans for 2024. Privately, Republican Sen. Lindsey Graham is quoted as saying, "if he wants to run, then he's going to have to deal with his personality problems ... we've got a very damaged team captain."
But in a conversation with Trump directly, Graham was much more optimistic.
"You've been written off as dead because of January the 6th. The conventional wisdom is that the Republican Party, under your leadership, has collapsed," Graham told Trump, according to the book. Graham continued, telling Trump that if "you came back to take the White House, it would be the biggest comeback in American history."
In July, Trump's former campaign manager Brad Parscale, who had been demoted and then stepped aside from the campaign in September 2020, asked the question.
"Sir, are you going to run?"
"I'm thinking about it ... I'm really strongly thinking about running," Trump said, according to the book.
"He had an army. An army for Trump. He wants that back," Parscale later told others. "I don't think he sees it as a comeback. He sees it as vengeance."