Former FBI Director James Comey confirmed on Twitter that he will testify privately with House Republicans and has dropped a legal challenge that was part of an effort to make sure any hearing would be public. Comey said he agreed to drop the legal challenge after Republican lawmakers agreed he could talk about his testimony freely and would be handed a transcript of the exchange within 24 hours. “Grateful for a fair hearing from judge. Hard to protect my rights without being in contempt, which I don’t believe in,” Comey wrote on Twitter. “So will sit in the dark, but Republicans agree I’m free to talk when done and transcript released in 24 hours. This is the closest I can get to public testimony.”

Grateful for a fair hearing from judge. Hard to protect my rights without being in contempt, which I don’t believe in. So will sit in the dark, but Republicans agree I’m free to talk when done and transcript released in 24 hours. This is the closest I can get to public testimony. — James Comey (@Comey) December 2, 2018

On Thursday, Comey had filed a lawsuit in an effort to block the subpoena to testify about the FBI’s investigations ahead of the 2016 presidential election. But now that an agreement has ben reached, Comey said he would withdraw his lawsuit and the House Judiciary Committee would quash its subpoena.

The hearing is part of an effort by Republicans to take one last stab at questioning Comey and former Attorney General Loretta Lynch on how they handled the investigation into Hillary Clinton’s email server as well as a probe into Russian interference in the election before they’re forced to turn control of the House over to Democrats. Comey had said since he was called to testify that he would want to do so publicly. But in the last week House Judiciary Committee Chairman Bob Goodlatte, a Virginia Republican, made clear Republicans had agreed to release the transcript of his testimony. “I have just offered to Director Comey that the Committees will publicly release the transcript of his testimony following the interview for our investigation,” Goodlatte wrote on Twitter on Wednesday. “This ensures both transparency and access for the American people to all the facts.”

I have just offered to Director Comey that the Committees will publicly release the transcript of his testimony following the interview for our investigation. This ensures both transparency and access for the American people to all the facts. — Bob Goodlatte (@RepGoodlatte) November 28, 2018