James Comey asked a federal judge on Thursday to block a subpoena from Republican members of both the House Oversight Committee and the House Judiciary Committee that ordered the former FBI director to testify in a closed-door testimony next week.

Former Attorney General Loretta Lynch was also reportedly subpoenaed by GOP Congress members, who are probing the FBI’s involvement in the 2016 election. However, Democrats are set to take control of the House in January after major wins in the midterms, which means this investigation into Comey and the bureau could likely conclude soon.

Comey, a Republican, was fired by President Donald Trump in May 2017, a move that drew severe criticism from many people. The FBI boss’s dismissal came just days before special counsel Robert Mueller officially began his inquiry into Russian interference in the 2016 election and potential collusion between Trump associates and the Kremlin.

Comey stated he would be prepared to talk to Republican lawmakers, although he insisted that his testimony be made public.

SLIDESHOW: DONALD TRUMP’S 30 CRAZIEST TWEETS

Comey’s legal team also said in a statement that GOP lawmakers had abused their authority by “selectively leaking” information in order to support their political beliefs.

“The obvious way to eliminate selective and inaccurate leaks and to curb the potential for abusive conduct by the Joint Committees is to make these proceedings open to the public,” Comey’s lawyers wrote. “The clear pattern of leaks and other comments by members of the Joint Committees make plain that the request for secrecy in these interviews is not about secrecy, but a mechanism to permit selective and biased exposure of testimonial snippets.”

Earlier this year, explosive memos of conversations Comey had with Trump were released. Trump has long blasted the former FBI boss and the bureau for being biased against him, while Comey has also heavily criticized the president, even to the point of comparing Trump to a “mob boss” and urging Americans to vote Democratic in the midterm elections.

The House Oversight and Judiciary Committees are probing not only the FBI’s role in investigating Trump campaign officials but also its inquiry into Hillary Clintons use of a private email server. Comey and the FBI had initially cleared Clinton of any wrongdoing, but then reopened their probe into the former secretary of state just two weeks before the 2016 election. Clinton later said Comey was partly to blame for her loss.

Virginia GOP Rep. Bob Goodlattethe House Judiciary Chairman, criticized Comey on Twitter on Thursday:

It was recently revealed that Trump wanted to order the Justice Department to prosecute Clinton and Comey.