The line started forming outside Room 216 of the Senate’s Hart Building just after 4am and kept growing. By nine o’clock, it stretched out 50 yards along a long corridor. The crowd was made up mostly of young congressional interns, given leave from their posts to witness the event.

But there were also local residents drawn by an overwhelming sense in Washington that something momentous was happening.

“I wanted to have a front seat to see history in the making,” said Ami Francisco, who had crossed the river from Virginia to be there. “All Americans should be concerned with the possibility that a foreign government interfered with the democratic process.”

Francisco was old enough to remember Watergate. “This is comparable,” she said. “It has that potential – unfortunately.”

When 10 o’clock came, Richard Burr, the Republican senator chairing the hearing, insisted that getting to the bottom of that question was the goal of the Senate intelligence committee’s work.

In particular, Burr asked, “did the Russian attempt to forge contacts with the Trump campaign rise to the level of collusion?”

More immediately, the matter in hand was the character and bearing of the former FBI director, James Comey, who Donald Trump had fired on 9 May and who had on Wednesday delivered a detailed and damning written account of his meetings and conversations with the president – an account that portrayed Trump as determined to establish “patronage” over Comey so he could command his loyalty and thereby convince him to shut down the FBI investigation into his former national security adviser Michael Flynn’s contacts with Russia.

Whether this amounted to obstruction of justice, potentially an impeachable offence, would depend a lot on the details and the credibility of the protagonists. To that end, Comey’s oral testimony would be crucial.

The ousted FBI director’s arrival through a door alongside the white marble facade set off a sudden flurry, as the photographers rushed to that side of the chamber. At 6ft 8in, Comey was easily visible above the fray as he made his way to the witness table.

Room 216 is a long high-ceilinged rectangle, panelled in wood on three sides, with a massive slab of white marble covering the fourth wall, behind the inquisitorial bench where the senators sit – Republicans to Burr’s left, Democrats to the right, starting with the most senior minority member, Senator Mark Warner.

The matter before the committee was of such gravity, Burr said, that it was “too important for anyone trying to score political points.” Few in the room took that seriously. The Democrats were there to prosecute the president. Most of the Republicans were there to defend him, or failing that, to direct attention elsewhere.

None of them sought to impugn Comey. White House attempts to smear him, and Trump’s own description of him to Russian officials as a “nut job”, had triggered a wave of outrage from the rank-and-file of the FBI. Senators of both parties went out of their way to praise Comey for his service and his integrity.

In what would develop into a trial of character, measuring Comey against the absent president, the former began the day with a huge advantage – and the gap seemed to widen as the hours went on.

Invited to deliver a statement, Comey began with the circumstances of his firing, which quickly put Trump’s truthfulness at centre stage.

“The explanations, the shifting explanations,” for his firing “confused me and increasingly concerned me,” Comey said. “They confused me because the president and I had had multiple conversations about my job, both before and after he took office, and he had repeatedly told me I was doing a great job, and he hoped I would stay,” Comey said.

“So it confused me when I saw on television the president saying that he actually fired me because of the Russia investigation.”

What drove him from confusion to outrage were the press briefings from the White House that the FBI was in disarray and had lost confidence in its leader.

“Those were lies, plain and simple. And I am so sorry that the FBI workforce had to hear them, and I’m so sorry that the American people were told them,” Comey said. The words drew a gasp from the press seats with the sense that a new line had been crossed in an already extraordinary scandal. A former FBI director had just called the president a liar.

A few minutes later, he did it again. In the few one-on-one conversations he had with Presidents George W Bush and Barack Obama, Comey said he never felt the need to take notes afterwards. Trump was different.

“I was honestly concerned he might lie about the nature of our meeting, so I thought it important to document,” he said.

Sitting across from a camera that looks out from a square hole in the white marble, beneath the Senate seal above the heads of the committee, Comey took the opportunity to say goodbye to his staff that he was denied when Trump sacked him while he was out of town on the west coast.

“It was the honour of my life to serve beside you, to be part of the FBI family, and I will miss it for the rest of my life,” Comey said. “Thank you for standing watch. Thank you for doing so much good for this country. Do that good as long as ever you can.”

James Comey at the hearing. Photograph: Xinhua / Barcroft Images

Burr began his questions on one of the key points of Comey’s written testimony, that after an Oval Office counter-terrorism meeting on 14 February, Trump ordered everyone else out of the room and, when he was alone with Comey, he talked about the investigation into his national security advisor, Michael Flynn, who had resigned the day before over his contacts with the Russian ambassador to Washington. “I hope you can see your way clear to letting this go, to letting Flynn go,” Trump said, by Comey’s account.

The former FBI director left it to others whether that conversation amounted to obstruction of justice, but he made it clear he viewed that as a possibility.

“I took it as a very disturbing thing, very concerning, but that’s a conclusion I’m sure the special counsel will work towards to try and understand what the intention was there, and whether that’s an offence,” Comey said.

Another Republican senator, James Risch, sought to exculpate the president, focusing on his use of the words “I hope”. Surely that was not an order to drop the case? Risch asked. But the gambit backfired.

“I took it as a direction,” Comey said. “I mean, this is a president of the United States with me alone saying “I hope…” this. I took it as: this is what he wants me to do. I didn’t obey that, but that’s the way I took it.”

After that exchange, the Republican side of the bench altered its line of questioning, focusing on his investigation in 2016 into Hillary Clinton’s use of a personal email server for classified material. Comey revealed that Obama’s attorney general at the time, Loretta Lynch, asked him to refer to it as a “matter” rather than an “investigation”, although that it what it clearly was.

Lynch’s language, Comey said, “ gave the impression that the attorney general was looking to align the way we talked about our work” with the Clinton campaign.

“That was inaccurate,” he said. “That gave me a queasy feeling.”

The exchange raised new questions about Lynch’s behaviour, but only enhanced Comey reputation for non-partisanship, which is quickly emerging as one of Trump’s biggest challenges as he considers a response.

The other question it raised about his leadership of the FBI was why he would go along with an order he was so uncomfortable with.

On Lynch’s directive he decided it looked “silly” but was not “a hill worth dying on”.

But he was also asked, by both Democrats and Republicans, why he did not simply tell the president when he brought up the Flynn case in the Oval Office that he was behaving improperly, and to stop. Comey conceded it was “a great question”.

“Maybe if I were stronger, I would have. I was so stunned by the conversation that I just took in,” he said. “I hope I’ll never have another opportunity. Maybe if I did it again, I’d do it better.”

If Comey was too overwhelmed by the enormity of the occasion to face down the president, he was clearly more than an equal to him in the game of chess that has ensued, in which the former lawman admitted he used a strategic leak.

After waking in the middle of the night after Trump tweeted about the possible existence of tapes of their conversations, he asked a university professor friend to pass on the memo of his Oval Office meeting to a reporter, with the intention that it would help spur the appointment of a special counsel to take over the investigation. A special counsel, Robert Mueller, was appointed the next day.

The congressional session, which was marked throughout by moments of high drama, ended on a note of pathos, as John McCain, the veteran Republican senator from Arizona and former presidential contender was the last to ask questions.

McCain, who had spent much of the session with his eyes closed, struggled to focus his questions, which seemed to assume wrongly that the Clinton investigation had also involved links with Russia. Why had that investigation been closed while Trump’s had been left open, he demanded. Comey was clearly as confused as the other senators on the bench, who looked increasingly alarmed.

McCain later put out a statement saying: “Maybe I shouldn’t stay up late watching the Diamondbacks night games.”

Even before Comey started speaking, it seemed likely that firing the FBI director was one of Trump’s poorer decisions since entering the Oval Office. By the time the hearing was over, that was beyond any doubt. The president had made a formidable enemy, who used the occasion to remind the Senate of what was at stake.

“We have this big, messy, wonderful country, where we fight with each other all the time. But nobody tells us what to think, what to fight about, what to vote for except other Americans,” Comey told the president. “But we’re talking about a foreign government that using technical intrusion, lots of other methods tried to shape the way we think, we vote, we act. That is a big deal.”