At Jeff Sessions’s urging, Trump nominated Rod Rosenstein to be deputy attorney general in early February. He was confirmed in April, just as the president’s relationship with Comey was turning toxic. The FBI director’s standing deteriorated further on May 3, when Comey vigorously defended his handling of the Clinton email investigation in an appearance before the Senate Judiciary Committee. While Comey was always seen as somewhat sanctimonious, his refusal to accept the possibility that he had made a grievous mistake infuriated Democrats and vexed his new Justice Department bosses, Sessions and Rosenstein. His failure during the hearing to declare that the bureau was not investigating Trump himself, and his statement that it made him “mildly nauseous” to think that his handling of the email probe had possibly cost Clinton the race, incensed the president.

The fallout was swift. A White House official returned from a meeting with Rosenstein to inform McGahn that the deputy attorney general had been troubled by Comey’s performance and wished to discuss how to address his refusal to acknowledge—let alone correct—his errors in judgment. Trump stewed about Comey all weekend during a trip to his golf club in Bedminster, New Jersey, and returned to Washington clutching the draft of a letter firing his FBI director—something he had begun composing numerous times only to be talked down by Priebus and others who feared that dismissing Comey would unleash a legal and political maelstrom.

On Monday, May 8, five days after Comey’s testimony, Trump summoned Pence, Priebus, McGahn, Sessions, and Rosenstein to the Oval Office. It was a Comey-bashing session in which nearly everyone—including Rosenstein—participated with enthusiasm. The president declared that he had decided to get rid of the FBI director, and mentioned the letter he’d written. It faulted Comey for his handling of the Clinton email investigation—something Trump had praised in his personal meetings with the FBI chief—and expressed his continued irritation that Comey had failed to tell the public what he had said several times in private, that Trump was not a target of the FBI probe.

The president was the only one in the room who seemed to fail to see the problem of drawing such a clear line between his frustration with the Russia probe and his firing of the FBI director. Priebus and others convinced Trump to abandon the text he’d drafted. Instead, as Trump listened to Sessions and Rosenstein voice their criticism of Comey over the emails case, Trump settled on an alternate plan, instructing his Justice Department team to produce memos documenting their concerns with their FBI subordinate. Rosenstein agreed to go along, believing, as he would put it later, that he was simply providing “advice and input.” But there was no mistaking the dynamic—the president had reached his conclusion and wanted to be able to pin the decision on others.

The Directors Guild of American building in Southern California resembles a stack of film canisters rising from the southern edge of the most iconic street in Hollywood, Sunset Boulevard. Posters and red-velvet rope lines were already in place at the building’s entrance on Tuesday, May 9, directing would-be FBI agents to a minority recruiting job fair inside a theater normally reserved for movie screenings and appearances by prominent directors. The event—aimed at diversifying the ranks of a federal law enforcement agency whose 13,000 agents are 83 percent white—was scheduled to get under way at 4 p.m., with a keynote speech by Comey.

He never made it.

The FBI director had arrived in Los Angeles early to visit the FBI’s field office, an equally imposing if less architecturally redeeming structure on Wilshire Boulevard. He was speaking to a group of assembled agents in a room at the bureau’s command center about a seemingly trivial issue—the recent revision of the FBI’s mission statement—when television screens at the back of the room flashed a startling headline: Comey resigns.

Comey thought it was a practical joke. “That’s pretty funny,” he said. “Somebody put a lot of work into that one.” Then the screens, tuned to three separate newscasts, displayed a revised banner: Comey fired. A nervous energy spread through the room. “Look, I’m going to go figure out what’s happening,” Comey said. “But whether that’s true or not, my message won’t change, so let me finish it and then shake your hands.” He insisted on completing his remarks to a crowd that was still watching but had stopped listening. The head of the nation’s most powerful law enforcement agency was being stripped of his command before their eyes.

Only one other FBI director in the bureau’s 109-year history had ever been fired. William Sessions (no relation to Jeff) had been terminated by Bill Clinton in 1993 amid allegations of serious ethical lapses documented in a scathing government report. The FBI’s Sessions had set up flimsy official appointments to charge the government for otherwise personal travel, billed the government for a $10,000 fence around his home, and refused to turn over records related to a $375,000 mortgage that investigators viewed with suspicion. Those all seemed like reasonable grounds for termination and, notably, had nothing to do with Clinton.

Trump’s letter to Comey went out of his way to put the firing on Sessions and Rosenstein: “While I greatly appreciate you informing me, on three separate occasions, that I am not under investigation, I nevertheless concur with the judgment of the Department of Justice that you are not effectively able to lead the Bureau.” In emphasizing the supposed reassurances from Comey, Trump was again calling attention to the Russia probe, which, in theory, should have had nothing to do with the FBI director’s termination.

“ Trump badly miscalculated the reaction, not only from Democrats but from members of his own party. Comey's firing brought immediate comparisons to the Saturday Night Massacre in 1973. ”

The White House promptly released the letters from Sessions and Rosenstein as the main exhibits in the case against Comey. Sessions’ was a single paragraph recommending Comey’s removal but leaving it to his deputy to list the reasons. Rosenstein’s memo spilled over three pages. He said Comey “deserves our appreciation for his public service,” but that he could “not understand his refusal to accept the nearly universal judgment that he was mistaken” in his handling of the Clinton probe. The FBI chief had been “wrong to usurp the attorney general’s authority” in announcing there would be no prosecution. He chastised Comey for blasting Clinton in a press conference, his defiant testimony before Congress, and his maddening “speak or conceal” explanation for his public reopening of the Clinton investigation in the final weeks of the election. Rosenstein listed seven former top Justice Department officials who had similarly denounced Comey and closed with a devastating assessment: “The FBI is unlikely to regain public and congressional trust until it has a director who understands the gravity of the mistakes and pledges never to repeat them.”

In a chaotic scene at the White House grounds that night, spokesman Sean Spicer ducked behind some bushes to huddle with other aides out of earshot from reporters clamoring for answers about Comey’s termination, then reemerged to claim that Trump hadn’t even been thinking of firing the FBI chief until he saw the letter from Rosenstein. “It was all him,” Spicer said.

Trump had somehow convinced himself that he would be praised for removing Clinton’s tormentor. His claim to be acting out of concern over the email case was not particularly persuasive from a president who had never seemed troubled with how others—especially his 2016 opponent—were treated by the legal system but was consumed with the “witch hunt” pursuit of himself.

But Trump badly miscalculated the reaction, not only from Democrats but from members of his own party. As much as Comey had become a target of bipartisan anger in Washington, his firing brought immediate comparisons to the Saturday Night Massacre in 1973, when the attorney general and deputy attorney general both resigned rather than carry out Nixon’s order to fire the Watergate special prosecutor.

A sense of panic began to spread in Washington, a fear that the president was steering the country into a constitutional crisis. Sen. Richard Burr (R-NC), chairman of the Senate Intelligence Committee, said he was “troubled by the timing and reasoning of Director Comey’s termination,” describing the FBI director as a “public servant of the highest order.”

Rosenstein, an Ichabod Crane–like figure who smiles nervously under stress, seemed shaken by the sequence of events. For a man accustomed to navigating some of the most complicated legal and bureaucratic terrain in federal law enforcement, his political naiveté was surprising. He had delivered a detailed indictment of the FBI director and failed to anticipate how it—how he—would be used. After 27 years of cultivating a reputation for rectitude, Rosenstein was being accused of betraying both Comey and the department, as well as being manipulated by the president—in short, of being a stooge.

Reporters began staking out his brick ranch-style home in Bethesda, Maryland. Colleagues began whispering in the hallways at Justice, “What happened to Rod?” Rosenstein called McGahn at the White House in a state of extreme agitation the day after Comey’s firing, threatening to resign if the White House continued to be misleading about his role in the decision. (Rosenstein would publicly deny he had done so.) He began sending late-night text messages to friends in which he seemed to be consumed with agony and anger. Some worried about his emotional state.

The damage worsened as Trump inevitably began undermining his own subordinates’ claims that this was all about the emails. He first did so in private. The day after Comey’s firing, Trump welcomed Kislyak and Foreign Minister Sergei Lavrov to the White House, then bragged that he had “just fired the head of the FBI. He was crazy, a real nut job.” Heedlessly, he declared his troubles over. “I faced great pressure because of Russia,” he said. “That’s taken off.”

But even before those words leaked, Trump had demolished his explanation for firing Comey in public.

Trump’s penchant for claiming credit and settling scores—even when against his own interests—undercut the White House script pointing blame at Sessions and Rosenstein. During a May 11 interview with NBC News anchor Lester Holt, Trump was pressed on whether the Russia probe was a factor in Comey’s firing. He replied: “When I decided to just do it, I said to myself, I said, ‘You know, this Russia thing with Trump and Russia is a made-up story. It’s an excuse by the Democrats for having lost an election they should have won.’”

Amid the fallout, the Justice Department and White House were forced to get on with the search for a new FBI director. Potential candidates began passing through the Justice Department’s Art Deco and Greek Revival building a few blocks east of the White House. Among them was someone Rosenstein had known for decades, one of his first supervisors at the department. Rosenstein had joined Justice in 1990 through an honors program for promising recent law graduates and went to work prosecuting public corruption cases as a trial attorney for the Criminal Division. The unit was led in those days by an anvil-jawed assistant attorney general named Robert S. Mueller III.

Mueller has gone on to serve as FBI chief longer than anyone except J. Edgar Hoover. He was originally appointed by George W. Bush, and Obama had taken the extraordinary step of securing congressional approval to extend Mueller’s ten-year tenure rather than replace someone no one particularly wanted to leave. After the crisis of the Comey firing, Rosenstein probed Mueller on whether he might be willing to come back to restore confidence and order. The two met in Rosenstein’s fourth-floor office during the tumultuous week after Comey’s termination, and while Mueller didn’t appear particularly eager to return to his old job at age 72, he understood the gravity of the situation for his beloved bureau. The conversation went well enough that arrangements were made for the retired FBI director to meet with Trump at the White House on May 16.

The Mueller who arrived at the White House seemed not to have lost a step. On his way to the Oval Office, he bumped into political adviser Stephen Bannon, who had been an officer in the Navy, as had Mueller’s own father. Mueller chided Bannon, a Navy man, for allowing his daughter to go to West Point. He wasn’t even supposed to see Bannon that day but had clearly done his homework. Mueller and Trump talked for about thirty minutes. Trump found him “smart and tough,” a type he instinctively admires. But Mueller had signaled from the start of the conversation that he was not certain that it made sense for him to return to the job he’d held for 12 years. As Mueller demurred, the president didn’t know that another job offer was coming for the former FBI director.

The same day as Mueller’s visit to the White House, The New York Times reported that Comey had secretly kept memos documenting his interactions with the president, including one that described Trump’s effort to convince Comey not to pursue charges against Flynn. Comey months later admitted that he had orchestrated the story, instructing a friend, a professor at Columbia Law School, to reveal the memo’s contents to the Times. In testimony before the Senate Intelligence Committee, he said that he had done so in the hopes that it would spur the appointment of a special counsel. The fired FBI director, who over dinner with Trump had gone to such lengths to say that he didn’t “do sneaky things, I don’t leak, I don’t do weasel moves,” had just orchestrated a leak of major proportions.

The next day, Wednesday, Rosenstein and Sessions were scheduled to meet with Trump themselves to talk about the candidates for the FBI job. Instead, Rosenstein stayed behind at Justice, sending Sessions ahead without him, saying something pressing had come up. As Sessions and Trump began talking in the Oval Office late that afternoon, an alert went out to reporters who cover the Justice Department, summoning them to a first-floor conference room. As they assembled, Rosenstein called McGahn to tell him that as acting attorney general on the Russia investigation—because of Sessions’ recusal—he was appointing a special counsel to take over the probe. He had already signed the paperwork.

It was a devastating development for the White House. Special prosecutors have been used since the Ulysses S. Grant administration to handle investigations where a conflict of interest (such as a president’s sway over the attorney general) threatens to influence the outcome. It’s not just their broad investigative powers that presidents find so unnerving, but the tendency of an entity that is specially created to look for a crime to keep going until it finds one.

McGahn pulled Sessions out of the meeting with Trump and forced Rosenstein to tell the attorney general himself. Sessions’ recusal meant he was no longer making decisions related to the Russia probe, but he didn’t expect to be blindsided. Sessions, staggered by the news, went back in to inform the president. Trump, so certain that he had turned a corner on the Russia probe by getting rid of Comey, went ballistic, screaming obscenities that rattled the walls of the White House.

Moments later, Rosenstein issued a statement. “The public interest requires me to place this investigation under the authority of a person who exercises a degree of independence from the normal chain of command,” it said. He had already signed an order, No. 3915-2017, appointing Mueller special counsel with sweeping investigative authority and resources. Rosenstein, who had been so thoroughly played by the president just eight days earlier, had ambushed the commander in chief and the attorney general.

Mueller, arguably the nation’s most experienced and respected law enforcement official, was taking on the case of his life.

From the book THE APPRENTICE: Trump, Russia and the Subversion of American Democracy by Greg Miller. Copyright © 2018 by WP Company LLC. Reprinted by permission of Custom House, an imprint of HarperCollins Publishers.