Top FBI officials advised the fired former Director James Comey to coordinate his congressional testimony last summer with special counsel Robert Mueller, according to emails obtained by a nonprofit government watchdog group.

Judicial Watch released the correspondence Thursday, providing the first confirmation of news reports indicating that Comey consulted with Mueller, who is investigating allegations President Donald Trump’s 2016 campaign colluded with Russian interests.

The hearing in question took place June 8 before the Senate Select Committee on Intelligence, during which Comey famously admitted to using a Columbia Law School professor to leak information from memos he wrote about his private interactions with Trump.

Comey testified that he did so hoping the Department of Justice (DOJ) would appoint a special counsel as a result.

“These documents show that James Comey, who was fired by the president, nevertheless had easy, friendly access to the FBI as he prepped his infamous anti-Trump testimony to the Senate,” Judicial Watch President Tom Fitton said in a prepared statement. “This collusion led to Comey’s attacking President Trump and misusing FBI records as part of a vendetta against the president.”

Trump has accused Comey of violating FBI rules by leaking information regarding private conversations about which the president might assert executive privilege. Comey steadfastly has denied any wrongdoing.

The emails obtained by Judicial Watch as part of its Freedom of Information Act (FOIA) request show conversations between Comey and then-FBI chief of staff James Rybicki, then-acting Director Andrew McCabe and Assistant Director Gregory Brower.

At 6:30 p.m. on May 18, Comey confirmed to Rybicki he had accepted the invitation to appear before the Senate intelligence panel but rebuffed requests by the Judiciary and the Oversight and Government Affairs committees.

Comey asked to be able to review FBI documents before his testimony.

“I just got off a call with Senators [Richard] Burr and [Mark] Warner,” reads an email sent to Rybicki by someone whose name is redacted but who appears to be Comey. “They would like to have a hearing next Wednesday at which I testify, first in open session and then in closed, if necessary. I asked them not to announce it until I check with FBI/DOJ to see if you want to discuss anything before they do that.”

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

The emailer also states that he “told them I had asked for guidance on any institutional prerogatives and for the opportunity to review any documents FBI has produced that relate to me. I told them I would communicate with them by the end of the day to either ask them to hold announcing the Wednesday hearing or go ahead.”

The following day, Rybicki wrote to McCabe, Brower, former FBI General Counsel James A. Baker and others about a “draft response” to Comey.

Related: Judicial Watch May Get Peek at Redacted Mueller Scope Memo

“In response to your emails below we have consulted with executive management here, including the general counsel, and recommend the following,” Rybicki wrote. The recommendations included, “That your counsel consult with special counsel Mueller to determine the timing of any such testimony.”

The draft response to Comey also recommended that his lawyer directly communicate to various congressional committees whether or not he would appear. The email also stated that the FBI Office of General Counsel was prepared to discuss with Comey “institutional privileges or prerogatives that may be presented by any such testimony.”

Since his testimony, Comey has written a scathing anti-Trump memoir and embarked on a media blitz attacking the president’s character and fitness for office. Meanwhile, Mueller has obtained numerous indictments, but none that connect Trump to an election-related conspiracy with Russians.

PoliZette senior writer Brendan Kirby can be reached at [email protected]. Follow him on Twitter.