The day after President Donald Trump asked James B. Comey, the FBI director, to end an investigation into his former national security adviser, Comey confronted Attorney General Jeff Sessions and said he did not want to be left alone again with the President, according to current and former law enforcement officials.

Comey believed Sessions should protect the FBI from White House influence, the officials said, and pulled him aside after a meeting in February to tell him that private interactions between the FBI director and the President were inappropriate. But Sessions could not guarantee that the President would not try to talk to Comey alone again, the officials said.

Comey did not reveal, however, what had so unnerved him about his Oval Office meeting with the President: Trump’s request that the FBI director end the investigation into the former national security adviser, Michael T. Flynn, who had just been fired. By the time Trump fired Comey last month, Comey had disclosed the meeting to a few of his closest advisers but nobody at the Justice Department, according to the officials, who did not want to be identified discussing Comey’s interactions with Trump and Sessions.

​Comey will be the centre of attention Thursday during testimony before the Senate Intelligence Committee, where he is expected to be quizzed intensely about his interactions with Trump and why he decided to keep secret the president’s request to end the Flynn investigation.

Comey’s unwillingness to be alone with the president reflected how deeply Comey distrusted Trump, who Comey believed was trying to undermine the FBI’s independence as it conducted a highly sensitive investigation into links between Trump’s associates and Russia, the officials said. By comparison, Comey met alone at least twice with President Barack Obama.

A spokesman for the FBI declined to comment on Comey’s request. A Justice Department spokesman, Ian Prior, said that “the attorney general doesn’t believe it’s appropriate to respond to media inquiries on matters that may be related to ongoing investigations.”

Yet according to two people who were briefed on the discussions, Sessions offered to resign in recent weeks as he told Trump he needed the freedom to do his job.

On Tuesday, the White House declined to say whether Trump still had confidence in his Attorney General.

The Justice Department typically walls off the White House from criminal investigations to avoid even the appearance of political meddling in law enforcement. But Trump has repeatedly interjected himself in law enforcement matters, and never more dramatically than in his private meetings with Comey.

“You have the President of the United States talking to the Director of the FBI, not just about any criminal investigation, but one involving his presidential campaign,” said Matthew S. Axelrod, who served in senior Justice Department roles during the Obama administration and is now a partner at the law firm Linklaters. “That is such a sharp departure from all the past traditions and rules of the road.”

But that raises one of the questions Comey will have to answer in his testimony on Thursday. If he believed that Trump was trying to get him to end an investigation, why did he not tell anyone about it?

Trump’s defenders note that Andrew G. McCabe, the acting director of the FBI, has said that “there has been no effort to impede our investigation.” Current and former law enforcement officials say Comey kept his interactions with Trump a secret in part because he was not sure whom at the Justice Department he could trust.

FBI officials were also unsure whether what Trump had done was a crime or how the conversation could ever be corroborated. So Comey kept the circle of officials at the FBI who knew about his interactions with Trump small because he did not want agents and analysts working on the case to be influenced by what the president wanted.

Comey’s decision to keep his interactions with Trump a secret from the Justice Department were the latest example of how he set himself apart from the department throughout his tenure at FBI director.

Several times during the FBI’s investigation into Hillary Clinton’s personal email server last year, for example, Comey made decisions without the Justice Department’s knowledge or approval, often to the consternation of Loretta Lynch, then the Attorney General. Comey has said he made those decisions — which have been praised and criticised along partisan lines — to protect the FBI’s independence.

“In a legal sense, we’re not independent of the Department of Justice,” Comey told Congress last month. “We are spiritually, culturally pretty independent group, and that’s the way you would want it.”

Comey is also likely to be asked Thursday what he told Trump about the Russia investigation. Trump has told aides and said publicly that, on three occasions, Comey assured him that he was not under investigation.

Current and former law enforcement officials said that when the investigation was handed over last month to a special counsel, Robert S. Mueller III, Trump was not a target. But it is not clear what, if anything, Comey told the President about whether he was being investigated.

While Justice Department policy allows authorities to tell people whether they are the target of an investigation, prosecutors — not FBI agents — handle such discussions. “We typically do not answer that question,” McCabe testified recently.

Former officials say Comey anticipated that the president might ask whether he was being investigated, and consulted his advisers on how to delicately sidestep the question. The officials were not aware of how Comey decided to answer.

When the Justice Department transferred the Russia investigation to Mueller, it gave him the authority to investigate whether the president broke any laws by attempting to obstruct the case or by firing Comey.

As FBI Director, Comey wrote a detailed memo after every major phone call or meeting with Trump and left those memos in the bureau’s files when he left. As special counsel, Mueller has access to those memos, but the FBI declined a request from the Senate Intelligence Committee for copies, citing the ongoing investigation. It is unclear whether Comey still has copies of all of them or plans to read from them during his testimony.

According to people briefed on the memos, they describe not only what Trump said, but details such as his tone and where he was sitting. In one memo, Comey described a dinner with Trump at the White House a week after the inauguration in January. Trump asked Comey to pledge his loyalty but Comey refused.

Two weeks later, on 14 February, Trump kicked Vice President Mike Pence, Sessions and other senior administration officials out of the Oval Office so he could have his one-on-one conversation with Comey, according to people briefed on one of Comey’s memos.

The biggest names involved in the Trump-Russia investigation Show all 17 1 /17 The biggest names involved in the Trump-Russia investigation The biggest names involved in the Trump-Russia investigation Paul Manafort Mr Manafort is a Republican strategist and former Trump campaign manager. He resigned from that post over questions about his extensive lobbying overseas, including in Ukraine where he represented pro-Russian interests. Mr Manafort turned himself in at FBI headquarters to special counsel Robert Mueller’s team on Oct 30, 2017, after he was indicted under seal on charges that include conspiracy against the United States, conspiracy to launder money, unregistered agent of a foreign principal, false and misleading US Foreign Agents Registration Act statements, false statements, and seven counts of failure to file reports of foreign bank and financial accounts. Getty The biggest names involved in the Trump-Russia investigation Rick Gates Mr Gates joined the Trump team in spring 2016, and served as a top aide until he left to work at the Republican National Committee after the departure of former Trump campaign manager Paul Manafort. Mr Gates' had previously worked on several presidential campaigns, on international political campaigns in Europe and Africa, and had 15 years of political or financial experience with multinational firms, according to his bio. Mr Gates was indicted alongside Mr Manafort by special counsel Robert Mueller's team on charges that include conspiracy against the United States, conspiracy to launder money, unregistered agent of a foreign principal, false and misleading US Foreign Agents Registration Act statements, false statements, and seven counts of failure to file reports of foreign bank and financial accounts. AP The biggest names involved in the Trump-Russia investigation George Papadopoulos George Papadopoulos was a former foreign policy adviser for the Trump campaign, having joined around March 2016. Mr Papadopoulos plead guilty to federal charges for lying to the FBI as a part of a cooperation agreement with Special Counsel Robert Mueller's investigation. Mr Papadopoulos claimed in an interview with the FBI that he had made contacts with Russian sources before joining the Trump campaign, but he actually began working with them after joining the team. Mr Papadopoulos allegedly took a meeting with a professor in London who reportedly told him that Russians had "dirt" on Hillary Clinton. The professor also allegedly introduced Mr Papadopoulos to a Russian who was said to have close ties to officials at the Russian Ministry of Foreign Affairs. Mr Papadopoulos also allegedly was in contact with a woman whom he incorrectly described in one email to others in the campaign as the "niece" to Russian President Vladimir Putin. Twitter The biggest names involved in the Trump-Russia investigation Donald Trump Jr The President's eldest son met with a Russian lawyer - Natalia Veselnitskaya - on 9 June 2016 at Trump Tower in New York. He said in an initial statement that the meeting was about Russia halting adoptions of its children by US citizens. Then, he said it was regarding the Magnitsky Act, a US law blacklisting Russian human rights abusers. In a final statement, Mr Trump Jr released a chain of emails that revealed he took the meeting in hopes of getting information Ms Veselnitskaya had about Hillary Clinton's alleged financial ties to Russia. He and the President called it standard "opposition research" in the course of campaigning and that no information came from the meeting. The meeting was set up by an intermediary, Rob Goldstone. Jared Kushner and Paul Manafort were also at the same meeting. Getty Images The biggest names involved in the Trump-Russia investigation Jared Kushner Mr Kushner is President Donald Trump's son-in-law and a key adviser to the White House. He met with a Russian banker appointed by Russian President Vladimir Putin in December. Mr Kushner has said he did so in his role as an adviser to Mr Trump while the bank says he did so as a private developer. Mr Kushner has also volunteered to testify in the Senate about his role helping to arrange meetings between Trump advisers and Russian Ambassador to the US Sergey Kislyak. Getty Images The biggest names involved in the Trump-Russia investigation Rob Goldstone Former tabloid journalist and now music publicist Rob Goldstone is a contact of the Trump family through the previously Trump-owned 2013 Miss Universe pageant, which took place in Moscow. In June 2016, he wrote to Donald Trump Jr offering a meeting with a Russian lawyer, Natalya Veselnitskaya, who had information about Hillary Clinton. Mr Goldstone was the intermediary for Russian pop star Emin Agalaraov and his father, real estate magnate Aras, who played a role in putting on the 2013 pageant. In an email chain released by Mr Trump Jr, Mr Goldstone seemed to indicate Russian government's support of Donald Trump's campaign. AP images The biggest names involved in the Trump-Russia investigation Aras and Emin Agalarov Aras Agalarov (R) is a wealthy Moscow-based real estate magnate and son Emin (L) is a pop star. Both played a role in putting on the previously Trump-owned 2013 Miss Universe pageant in Moscow. They allegedly had information about Hillary Clinton and offered that information to the Trump campaign through a lawyer with whom they had worked with, Natalia Veselnitskaya, and music publicist Rob Goldstone. Getty Images The biggest names involved in the Trump-Russia investigation Natalia Veselnitskaya Natalia Veselnitskaya is a Russian lawyer with ties to the Kremlin. She has worked on real estate issues and reportedly counted the FSB as a client in the past. She has ties to a Trump family connection, real estate magnate Aras Agalarov, who had helped set up the Trump-owned 2013 Miss Universe pageant which took place in Moscow. Ms Veselnitskaya met with Donald Trump Jr, Jared Kushner, and Paul Manafort in Trump Tower on 9 June 2016 but denies the allegation that she went there promising information on Hillary Clinton's alleged financial ties to Russia. She contends that the meeting was about the US adoptions of Russian children being stopped by Moscow as a reaction to the Magnitsky Act, a US law blacklisting Russian human rights abusers. Getty Images The biggest names involved in the Trump-Russia investigation Mike Flynn Mr Flynn was named as Trump's national security adviser but was forced to resign from his post for inappropriate communication with Russian Ambassador to the US Sergey Kislyak. He had misrepresented a conversation he had with Mr Kislyak to Vice President Mike Pence, telling him wrongly that he had not discussed sanctions with the Russian. Getty Images The biggest names involved in the Trump-Russia investigation Sergey Kislyak Mr Kislyak, the former longtime Russian ambassador to the US, is at the centre of the web said to connect President Donald Trump's campaign with Russia. Reuters The biggest names involved in the Trump-Russia investigation Roger Stone Mr Stone is a former Trump adviser who worked on the political campaigns of Richard Nixon, George HW Bush, and Ronald Reagan. Mr Stone claimed repeatedly in the final months of the campaign that he had backchannel communications with WikiLeaks founder Julian Assange and that he knew the group was going to dump damaging documents to the campaign of Democratic candidate Hillary Clinton - which did happen. Mr Stone also had contacts with the hacker Guccier 2.0 on Twitter, who claimed to have hacked the DNC and is linked to Russian intelligence services. Getty Images The biggest names involved in the Trump-Russia investigation Jeff Sessions The US attorney general was forced to recuse himself from the Trump-Russia investigation after it was learned that he had lied about meeting with Russian Ambassador to the US Sergey Kislyak. Getty Images The biggest names involved in the Trump-Russia investigation Carter Page Mr Page is a former advisor to the Trump campaign and has a background working as an investment banker at Merrill Lynch. Mr Page met with Russian Ambassador to the US Sergey Kislyak during the 2016 Republican National Convention in Cleveland. Mr Page had invested in oil companies connected to Russia and had admitted that US Russia sanctions had hurt his bottom line. Reuters The biggest names involved in the Trump-Russia investigation Jeffrey "JD" Gorden Mr Gordon met with Russian Ambassador to the US Sergey Kislyak during the 2016 Republian National Convention to discuss how the US and Russia could work together to combat Islamist extremism should then-Republican presidential candidate Donald Trump win the election. The meeting came days before a massive leak of DNC emails that has been connected to Russia. Creative Commons The biggest names involved in the Trump-Russia investigation James Comey Mr Comey was fired from his post as head of the FBI by President Donald Trump. The timing of Mr Comey's firing raised questions around whether or not the FBI's investigation into the Trump campaign may have played a role in the decision. Getty Images The biggest names involved in the Trump-Russia investigation Preet Bharara Mr Bahara refused, alongside 46 other US district attorney's across the country, to resign once President Donald Trump took office after previous assurances from Mr Trump that he would keep his job. Mr Bahara had been heading up several investigations including one into one of President Donald Trump's favorite cable television channels Fox News. Several investigations would lead back to that district, too, including those into Mr Trump's campaign ties to Russia, and Mr Trump's assertion that Trump Tower was wiretapped on orders from his predecessor. Getty Images The biggest names involved in the Trump-Russia investigation Sally Yates Ms Yates, a former Deputy Attorney General, was running the Justice Department while President Donald Trump's pick for attorney general awaited confirmation. Ms Yates was later fired by Mr Trump from her temporary post over her refusal to implement Mr Trump's first travel ban. She had also warned the White House about potential ties former National Security Adviser Michael Flynn to Russia after discovering those ties during the FBI's investigation into the Trump campaign's connections to Russia. Getty Images

It was in that conversation that Trump asked Comey to end the investigation into Flynn, and encouraged him to investigate leaks, the people said.

“I hope you can see your way clear to letting this go, to letting Flynn go,” Trump told Comey, according to the memo Comey wrote describing that meeting. “He is a good guy. I hope you can let this go.”

Asked Tuesday about Comey’s coming testimony, Trump replied, “I wish him luck.”