WASHINGTON — Former FBI Director James Comey will testify Friday at a closed House Judiciary Committee hearing, his lawyers said after ending a legal fight to quash their subpoena.

Comey sued to block the summons last week, contending that the sealed testimony would be leaked and distorted by Republicans for political purposes.

Early Sunday, two days after Comey’s attorney conceded in court that no federal trial judge had ever rejected down a House subpoena, the former FBE director, who was fired by President Donald Trump in 2017, withdrew his request.

A lawyer for the Judiciary Committee offered to make a transcript of the testimony public within 24 hours. In a Twitter post Sunday, Comey indicated that he accepted those terms. “This is the closest I can get to public testimony,” he said. Soon after, Comey’s lawyers withdrew their request to quash the subpoena.

Comey is expected to be asked about actions taken by the FBI in 2016, including a decision not to recommend criminal charges against Democrat Hillary Clinton for her use of a private email server, and the FBI’s investigation into potential coordination between Russia and Trump’s campaign.

Comey demanded on Twitter Nov. 22 that House Republicans let the public watch his testimony. He is free to discuss his testimony, which is now voluntary, his lawyer said.

The hearing may be one of the final significant actions of the Republican-led Judiciary Committee under Chairman Bob Goodlatte of Virginia. In the new Congress, Democrats take the majority in the House and Rep. Jerrold Nadler of New York is likely to be the new chairman.