WASHINGTON (Reuters) - An FBI agent who criticized Donald Trump in text messages during the 2016 campaign vigorously defended himself at a raucous congressional hearing on Thursday that highlighted the deep divisions over a probe of Russian election meddling that has clouded Trump’s presidency.

Republicans and Democrats shouted and swapped insults in the U.S. House of Representatives session, attended by dozens of lawmakers, as agent Peter Strzok said his personal political views had never affected his official work.

During the hearing, Republicans attacked the FBI, as Trump himself has done, at a time when Special Counsel Robert Mueller is still investigating alleged Russian interference in the election and possible collusion between Moscow and Trump campaign aides.

Democrats said the hearing played into the Kremlin’s hands.

Democratic Representative Luis Gutierrez said when it was his turn to question Strzok: “Congratulations Kremlin, and congratulations to everyone who is helping them.”

Russian President Vladimir Putin, who will meet with Trump in Helsinki on Monday, has repeatedly denied U.S. intelligence agency conclusions that Moscow interfered in the campaign and tried to help Trump. [nL8N1U7564] [nL1N1U81DB]

Trump has described Mueller’s investigation as a political witch hunt.

Strzok said during the session, convened by two Republican-controlled committees: “Today’s hearing is just another victory notch in Putin’s belt and another milestone in our enemies’ campaign to tear America apart.”

Norm Ornstein, a scholar at the centrist American Enterprise Institute, said the Republicans at the hearing showed no “notion of seeing Russia as an adversary” and they were “all trying to do what Donald Trump wants them to do.”

Slideshow ( 10 images )

“This is going to undermine confidence in the FBI and other intelligence agencies,” he said. “There is collateral damage from these attacks that isn’t even being taken into account.”

Representative Bob Goodlatte, the Republican chairman of the House Judiciary Committee, said in his opening statement that the hearing was necessary. “The more information we acquire, the more interviews we conduct, and the more sources we contact, the more we learn.”

POLITICALLY CHARGED TEXTS

Strzok worked on the Russia investigation, which the FBI started but that Mueller later took over. Mueller was appointed by a top Justice Department official following Trump’s dismissal in May 2017 of FBI Director James Comey.

Strzok was reassigned from the Russia investigation. He earlier had worked on an FBI investigation into Democratic presidential nominee Hillary Clinton’s handling of classified information while she was secretary of state.

He and former FBI lawyer Lisa Page were having an extramarital affair during the campaign and exchanged thousands of politically charged texts. Some criticized Trump and some criticized Clinton.

In one text, Page asked Strzok if Trump was going to be president. Strzok replied: “No, he’s not. We’ll stop it.”

Strzok said on Thursday that the “we” in the text referred to the American people because he believed Trump would not win the election after criticizing families whose relatives had been killed while serving in the U.S. military.

Slideshow ( 10 images )

He said he had “expressed personal political opinions during an extraordinary presidential election” and that at times his “criticism was blunt,” but that it was not limited to Trump.

“Let me be clear, unequivocally and under oath: Not once in my 26 years of defending my nation did my personal opinions impact any official action I took,” Strzok told the committees.

Republican lawmakers asked Strzok to read aloud many of his texts. His attempts to explain them were often halted by the Republicans, who insisted he read them verbatim without providing more details.

There were more than 75 lawmakers present at some point during the hearing - nearly a fifth of the House. They often interrupted Strzok and one another.

“It’s a fraud, this hearing is a kangaroo court, it is a three-ring circus,” Democratic Representative Hakeem Jeffries said more than six hours into the hearing.

Strzok declined to answer a question from Republican Representative Trey Gowdy, head of the House Oversight and Government Reform Committee, about interviews he conducted during the FBI’s Russia probe, saying the agency had directed him not to discuss ongoing investigations.

Goodlatte threatened to hold Strzok in contempt at the end of the hearing if he did not answer Gowdy’s question.

The seldom-enforced charge of contempt of Congress can be brought against someone for obstructing investigations. It is potentially punishable by imprisonment and a fine but requires several procedural steps.

Strzok appeared before lawmakers in Congress last month for a closed-door interview. Page will attend a closed-door interview on Friday with the committees.