Former FBI director James Comey testified about former U.S. secretary of state Hillary Clinton's emails behind closed doors on Friday before House of Representatives lawmakers and said he believed the session could have been public.

He also said he had agreed to testify again on Dec. 17.

"When you read the transcript you'll see that we're talking again about Hillary Clinton's emails for heaven's sake, so I'm not sure we need to do this at all," Comey told reporters after testifying before the House judiciary and House oversight committees.

"We could have done this in open setting," he said.

Democrats say inquiry a distraction

The former FBI director dropped his opposition to a closed-door hearing on Dec. 2 after members of the judiciary committee panel agreed to provide a full transcript within 24 hours and said he would be permitted to make it public.

The panels are investigating Clinton's use of a private email server while she was in office and the handling of the probe into whether President Donald Trump's campaign colluded with Russia during the 2016 U.S. election.

New York Democrat Jerrod Nadler questioned the motivations of his Republican counterparts in their bid to question Comey behind closed doors on Friday on Capitol Hill. (J. Scott Applewhite/Associated Press)

The Republican-led inquiry has been lambasted by Democrats as a partisan effort to undermine special counsel Robert Mueller's investigation into Russian interference in the election. Russia has denied any interference.

Comey told reporters after the hearing he had total confidence that the use of electronic surveillance as part of investigation was handled in a "thoughtful, responsible way" by the Department of Justice and the FBI.

"I think the notion that FISA was abused here is nonsense," Comey said, referring to the Foreign Intelligence Surveillance Act that governs use of electronic surveillance by federal law enforcement.

Republicans unhappy with Comey

Some Republicans signalled they were unhappy with Comey's level of co-operation. California Rep. Darrell Issa said Comey had two lawyers in the room, his personal lawyer and a lawyer from the Justice Department. He said the department lawyer repeatedly instructed Comey not to answer "a great many questions that are clearly items at the core of our investigation."

Democrats disagreed that Comey wasn't being co-operative.

Republican Rep. Darrell Issa said Comey didn't answer many questions. (Manuel Balce Cenata/Associated Press)

"He answered the questions he had to answer," said Rep. Raja Krishnamoorthi of Illinois. But he added that he was left with the impression that "we got nowhere today."

Florida Rep,Ted Deutsch said the Republican majority "wishes to only ask questions still about Hillary Clinton's emails, all to distract from the big news today, which is what's happening in court."

Democrats will end inquiry

Mueller revealed more details about his Russia investigation in court on Friday as he faced deadlines in the cases of Trump's former campaign chairman, Paul Manafort, and former personal lawyer Michael Cohen.

Over the past year, Republicans on the two committees have called in a series of officials and suggested after the closed-door meetings that there is evidence of bias.

The investigation's most public day was a 10-hour hearing in which former FBI special agent Peter Strzok defended anti-Trump texts he sent to a colleague as he helped lead both investigations. Strzok defiantly fought with angry Republican lawmakers in a riveting hearing that featured Strzok reading aloud from his sometimes lewd texts, and Democrats and Republicans yelling at each other.

Special counsel Robert Mueller was appointed to lead a Russia probe after Comey's firing. (Joshua Roberts/Reuters)

New York Rep. Jerrold Nadler, the top Democrat on the judiciary panel, said as he walked into the Comey interview that he will end the investigation when Democrats take the House majority in January.

"This is a waste of time to start with," Nadler said. "The entire purpose of this investigation is to cast aspersions on the real investigation.... There is no evidence whatsoever of bias at the FBI or any of this other nonsense."

'Don't do it in a dark corner'

Comey, who has testified publicly on Capitol Hill about both the Clinton and Russia investigations, balked at the subpoena because he said committees were prone to selectively reveal information for political purposes.

"Don't do it in a dark corner and don't do it in a way where all you do is leak information," said Comey's attorney, David Kelley.

House judiciary committee chair Robert Goodlatte, a Virginia Republican, decried Comey's use of "baseless litigation" and called it an "attempt to run out the clock on this Congress," a reference to the few weeks left before Democrats take control. Goodlatte and South Carolina Rep. Trey Gowdy, chair of the oversight panel, are also retiring at the end of the year.

After the court fight was resolved, Goodlatte said a transcript will be released "as soon as possible after the interview, in the name of our combined desire for transparency."

A report released in June from the Justice Department's internal watchdog said Comey was "insubordinate" in his handling of the Clinton email investigation in the final months of the 2016 campaign. But it also found there was no evidence that Comey's or the department's final conclusions were motivated by political bias toward either candidate.

The report said the former FBI director, who announced in July 2016 that Clinton had been "extremely careless" with classified material but would not be charged with any crime, repeatedly departed from normal Justice Department protocol.

Yet it did not second-guess his conclusion that Clinton should not have been prosecuted, despite assertions by Trump and his supporters that anyone less politically connected would have been charged.