US President Donald Trump is pleased that fired FBI Director James Comey confirmed in prepared congressional testimony that Mr Trump was not under investigation in the probe of alleged Russian meddling in the US election, Mr Trump's outside attorney said in a statement.
"The President is pleased that Mr Comey has finally publicly confirmed his private reports that the President was not under investigation in any Russian probe," attorney Marc Kasowitz said.
"The President feels completely and totally vindicated," the statement said.
In dramatic written testimony, Mr Comey accused Mr Trump of asking him to drop an investigation of former national security adviser Michael Flynn as part of a probe into Russia's alleged meddling in the 2016 presidential election.
Mr Comey said Mr Trump told him at a meeting in the White House in February: "I hope you can see your way clear to letting this go, to letting Flynn go."
The testimony from Mr Comey, who was fired by Mr Trump last month, puts more pressure on the Republican whose presidency has been overshadowed by allegations that Moscow helped him win last year's election.
Mr Trump fired Mr Flynn in February in a controversy over contacts between the retired general and the Russian ambassador to the United States.
The FBI has been investigating Mr Flynn as it looks into allegations of links between Russia and the Trump campaign.
Mr Comey's statement, posted on the Senate Intelligence Committee's website, said Mr Trump also called him on 30 March to say he had nothing to do with Russia and asked what "we could do to lift the cloud" of the FBI's Russia investigation.
During that phone call, Mr Comey said he told Mr Trump the FBI was not investigating the president personally.
"He repeatedly told me, 'We need to get that fact out'," Mr Comey said.
Mr Comey said he had told Mr Trump on three occasions he was not being investigated, confirming an earlier account from the president.
Several congressional committees, as well as the FBI and a special counsel, are looking into reports that Russia tried to tilt the election in Mr Trump's favour, using means such as hacking into the emails of senior Democrats.
Mr Trump and the Kremlin have separately denied any collusion.
Mr Comey said Mr Trump told him at a one-on-one dinner on 27 January, a week after the president took office, that: "I need loyalty. I expect loyalty."
Mr Comey is to deliver his testimony in person at a much-anticipated hearing by the intelligence committee tomorrow.
During the dinner, the president asked him if he wanted to stay on as FBI director, Mr Comey said.
The former FBI head said he became concerned that Mr Trump was trying to create "some sort of patronage relationship".
After a 14 February meeting on counter-terrorism in the Oval Office, Mr Trump dismissed all the participants except Mr Comey, according to the testimony.
The president then initiated a conversation about Mr Flynn.
Mr Comey quoted Mr Trump as telling him: "I hope you can see your way clear to letting this go, to letting Flynn go. He is a good guy. I hope you can let this go."
Earlier, Mr Trump announced his nomination to replace Mr Comey in a tweet and it was officially confirmed this evening.
I will be nominating Christopher A. Wray, a man of impeccable credentials, to be the new Director of the FBI. Details to follow.— Donald J. Trump (@realDonaldTrump) June 7, 2017
Mr Wray was a former US attorney general under President George W Bush and is now in private practice.
He must be confirmed to the post by the Senate.