The man who wrote the memo used to justify the firing last week of FBI Director James Comey said in a closed session with Congress that he learned the top cop would be dismissed one day before he penned the memo.

>> Read more trending news

Deputy U.S. Attorney General Rod Rosenstein said Thursday in his opening statement that he learned on May 8 of Comey’s imminent dismissal. President Donald Trump “sought my advice and input,” he said.

The White House used Rosenstein’s three-page memo as rationale to fire Comey. The memo focused on Comey’s handling of the investigation into former Secretary of State Hillary Clinton’s use of a private server while in office.

In a letter calling for Comey’s dismissal, U.S. Attorney General Jeff Sessions pointed to his “evaluation, and … the reasons expressed by (Rosenstein).”

>> Related: Poll: Most Americans want special prosecutor for Russia investigation

Comey’s firing sparked suspicion among Trump’s critics and lawmakers worried that the president might use his power to influence the FBI’s investigation into whether Trump or his advisers colluded with Russia to win November’s presidential election.

President Trump Fires FBI Director James Comey

The White House denied that Comey's position as head of the investigation factored into his dismissal, although Trump told NBC News last week that he had "this Russia thing" on his mind when he made the decision.

Rosenstein said that after he was approached for advice, he wrote a memo to Sessions “summarizing my longstanding concerns about Director Comey’s public statements concerning the Secretary Clinton email investigation.”

>> Related: Report: Trump asked Comey to drop Flynn investigation

He reiterated that he felt Comey was “profoundly wrong and unfair” to both Clinton and the Justice Department in a July 2016 news conference about the investigation.

“It explicitly usurped the role of the attorney general, the deputy attorney general and the entire Department of Justice; it violated deeply ingrained rules and traditions and it guaranteed that some people would accuse the FBI of interfering in the election,” he said.

>> Related: Who are key players in the Russia/Trump saga?

Still, he said he believed that Comey “made his decisions in good faith.”

Multiple investigations into Trump’s ties to Russia are ongoing.

The president on Thursday characterized the investigations as politically motivated.

“This is the single greatest witch hunt of a politician in American history,” he said in a tweet.