Former FBI Director James Comey ended a legal battle with House Republicans on Sunday, announcing that he will testify behind closed doors on Capitol Hill this week after receiving assurances that a transcript of his interview will be released to the public.

Comey’s announcement brings to an end a short-lived standoff over the former FBI chief’s congressional testimony. Republicans on the House Judiciary and House Oversight and Government Reform Committees subpoenaed Comey on Nov. 21 to appear for a closed-door deposition on Dec. 3 to face questions about his handling of the Clinton email and Trump-Russia collusion investigations. (RELATED: Comey Sues To Block House Subpoena For Deposition)

Comey sought a public hearing, claiming in a court filing Thursday that he feared “selective leaks” from Republicans. But in an emergency court hearing Friday, Comey’s attorneys acknowledged that the request to quash the congressional subpoena was unorthodox, suggesting the motion had little chance of succeeding.

Comey wrote Sunday on Twitter that he was “grateful for a fair hearing from judge.”

He said that he will testify “in the dark” but that Republicans had agreed he is “free to talk when done and transcript released in 24 hours.”

“This is the closest I can get to public testimony,” he wrote.

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

Republicans argued against Comey’s motion to block the subpoena, noting that other current and former FBI officials have testified privately during the course of the committees’ investigation of the Clinton and Trump probes.

“Sixteen other people have testified under oath in the same setting that we’re asking him to do it and his claim that he needs to do it in public is, in my opinion, a farce,” Virginia GOP Rep. Bob Goodlatte, the chairman of the Judiciary Committee, told Fox News on Friday.

Republicans have accused the FBI and Justice Department of going easy on former Secretary of State Hillary Clinton and of abusing the surveillance court process to obtain spy warrants against former Trump campaign adviser Carter Page.

Republican lawyers said they wanted to secure Comey’s testimony ahead of a report that the committees are planning to release in the coming weeks.

“If Mr. Comey’s deposition were to be stayed, it would have a profound impact on the Committee’s investigation and prevent the Committee from providing a full accounting of DOJ’s actions in 2016. The Committee intends to issue a joint report (together with [the House Oversight Committee]) before the end of the 115th Congress – i.e., in a few short weeks,” lawyers for the House Judiciary Committee wrote in a court filing Friday.

Follow Chuck on Twitter

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.