James Comey may have told the president he wasn’t personally under criminal investigation. Others high up in the FBI had a somewhat different opinion.

In testimony today before the Senate Select Committee on Intelligence, the former director of the FBI undermined an early line of defense by Trump’s allies. Comey testified that while Trump was not himself under investigation, the functional head of the Russia inquiry was “reluctant” about Comey telling Trump that, since it misunderstood the nature of the counterintelligence inquiry – which could very well reach the president personally.

“I f you’re looking at potential coordination between the campaign and Russia, the person at the head of the campaign is the candidate, so logically, this person argued, the candidate’s knowledge [and] understanding would logically become a part of your inquiry, if it proceeds,” Comey testified.

In contrast, Comey, whom Trump fired on May 9, said that former national security adviser Michael Flynn “was in real legal jeopardy. There was an open criminal investigation in his connection with Russian contacts,” Comey testified to the Senate intelligence committee, detailing pressure from Trump over the Russia question that led to the firing of the FBI director.

“I take the president at his word that I was fired because of the Russia investigation,” Comey said, saying he understood the Flynn entreaty as an order from the president.

Mostly, however, Comey did not take Trump at his word. He repeatedly called Trump a liar, and said he kept detailed notes of their interactions because he was concerned Trump would mischaracterize them. Once Trump ultimately fired Comey, whom he told Russian officials was a “nut job,” Comey revealed that he put something of a doomsday plan into effect.

Trump intimated in a May 12 tweet that Comey ought to beware of “tapes” of their conversations. In response, the newly-fired director had a close friend – later determined to be Daniel C. Richman, a former federal prosecutor – leak his memo’s contents to the New York Times’ Michael Schmidt. Comey did so, he said, because it “might prompt a special counsel” to be empanelled, as ultimately happened.

Comey understood Trump’s pressure as “a very disturbing thing, very concerning, but that’s a conclusion I’m sure the special counsel will work towards to find out the intention and whether that’s an offense.”

Yet Comey, under questioning, declined to say Trump obstructed justice, leaving that determination for the special prosecutor, his predecessor at the FBI, Robert Mueller. “You can have high confidence that when [the investigation is] done, he’s turned over all the rocks,” Comey said of Mueller.

At the ex-director’s request, the committee released Comey’s prepared testimony a day early, ensuring blanket coverage in advance of what was already the most anticipated Washington hearing in years. What he described made explicit what his allies had been leaking to the press in the month since his firing: that Trump repeatedly and explicitly urged him to drop investigations into his aides.

Relying on contemporaneous notes from his four months of meetings and calls with Trump, Comey said the president had insisted on “loyalty” from the FBI director a week after the inauguration, a time when Washington was substantially focused on an intelligence assessment – backed by the FBI – that found Russia interfered in the election to aid Trump. Trump made his loyalty statement after intimating that Comey didn’t necessarily have to remain in his job.

Comey was in an additional bind: the FBI had been building a counterintelligence case into Trump’s allies since July. And while he had told Trump earlier that month that the president himself was not at that moment under investigation, Comey noted that the two men had “agreed I should do so if circumstances warranted.” So in response to Trump’s loyalty question, Comey said he froze: “I didn’t move, speak, or change my facial expression in any way during the awkward silence that followed. We simply looked at each other in silence.”

The day after Trump fired his national security adviser, a man whom Trump said had lied to the vice president about his discussions with the Russian ambassador about lifting US sanctions, Trump asked Comey to go easy on Michael Flynn. The FBI had interviewed Flynn on January 24 about his discussions with Sergey Kislyak and Flynn lied to them as well – thereby putting himself in legal jeopardy – by denying sanctions ever came up.

After Trump dismissed other Oval Office meeting participants, he beckoned Comey, alone, to stay. “I hope you can see your way clear to letting this go, to letting Flynn go,” Comey recalled Trump telling him – something Comey said was “very concerning, given the FBI’s role as an independent investigative agency.” He conferred with FBI leadership to plot a plan to protect the various Russia inquiries from the White House and its allies (“We did not intend to abide” Trump’s request, he said) and punted on the Flynn issue, opting to keep loyalist attorney general Jeff Sessions in the dark about Trump’s disconcerting request.

“Something big is about to happen and I need to remember every word that was spoken,” Comey recalled, explaining why he took detailed notes – which are admissible in court. “I knew something was about to happen that I needed to pay close attention to.”

He said his FBI senior colleagues were “as shocked and as troubled by it as I was.”

Among the reasons Comey kept Sessions at arm’s length were “facts that I can’t discuss in an open setting” concerning the attorney general’s contacts with Russia that ultimately prompted Sessions’ recusal. He also suggested that Sessions might snitch to the White House about the substance of the inquiry.

“It was of investigative interest to us to try and figure out so what just happened with the president’s request [about Flynn], so I would not have wanted to alert the White House that it had happened until we figured out what are we going to do with this,” Comey said.

While all this drama with Trump was unfolding, Comey was in a different kind of political jeopardy. He had already infuriated liberals for sandbagging Hillary Clinton with public word of a revived inquiry into her private email server – a revival that proved based on irrelevant information – days before the election. Then he had angered congressional Democrats further by refusing to publicly, or even privately, confirm that the FBI had been looking into Trump-Russia for months. Finally, in the first public hearing on the Hill into the question on March 20, Comey finally let it be known the investigation had been underway for about nine months.

Ten days later, Comey detailed, Trump called Comey and used a line his GOP allies had debuted at the March 20 hearing. The Russia inquiry, Comey said Trump told him, was “a cloud” that was hindering his presidency. “He asked what we could do to ‘lift the cloud’,” Comey described Trump telling him, a moment that now appears to be a central to the looming question of the Trump obstructing justice.

“That’s not how a president of the United States should behave,” said Mark Warner, the committee’s top Democrat.

Comey also confirmed that he decided to make a public statement about Clinton’s “reckless” use of a private email server after then-Attorney General Loretta Lynch met with former President Bill Clinton on an airport tarmac. He also backed up reporting by The New York Times in April, telling the committee that Lynch attempted to downplay the FBI probe into Clinton’s private server. According to Comey, Lynch asked him to call it a “matter” rather than an “investigation.”

The integrity of the congressional probes has been under a microscope. After House Intelligence Committee Chairman was forced to recuse himself from leading the lower chamber’s investigation over allegations that he was openly carrying the White House’s water, attention shifted to the Senate panel’s probe—putting Burr, who told voters during the campaign that there was “no separation” between him and Trump, on the hot seat.

Burr previously said he was “troubled by the timing and reasoning of Director Comey’s termination.” But during his opening statement, Burr did not express concern about the details contained in Comey’s testimony—instead declaring that they showed Comey and Trump had a “strained relationship.”

“The American people need to hear your side of the story,” Burr said, “just as they need to hear the president’s description of events.”

The firing was ostensibly sparked by Trump’s deputy attorney general, Rod Rosenstein, who wrote a pretextual memo saying that Comey’s actions against Clinton months earlier merited his departure . But then Trump contradicted him to NBC’s Lester Holt, saying instead that the Russia investigation was on his mind when firing Comey. Comey testified that he takes Trump at his word that he was fired because of the Russia investigation.

Comey began his highly-anticipated testimony by saying that the stated rationale behind his firing “were lies, plain and simple,” adding: “The administration then chose to defame me and more importantly the FBI.” In the days following Comey’s termination, the White House claimed that Comey had lost the confidence of the FBI. That claim was refuted by Acting Director Andrew McCabe.

While Comey left it to Mueller to determine if Trump had obstructed the Russia probe, he stepped right up to the water’s edge of that conclusion in his testimony.

“I was fired in some way to change or the endeavor was to change the way the Russia investigation was being conducted. That is a very big deal,” Comey said.