FBI agent Peter Strzok testified before members of the House Judiciary and Government Oversight & Reform Committees on Thursday about texts he and FBI lawyer Lisa Page exchanged during the election.

Rep. Louie Gohmert Jr. of Texas accused Strzok of lying under oath during his testimony, citing his previous infidelity with Page.

The room then erupted into chaos, with lawmakers shouting at Gohmert over the comment.

A congressional hearing devolved into chaos Thursday afternoon when Rep. Louie Gohmert of Texas attacked FBI agent Peter Strzok over his extramarital affair with FBI lawyer Lisa Page.

While accusing Strzok of lying under oath, Gohmert said, "I can't help but wonder when I see you looking there with a little smirk, how many times did you look so innocently into your wife's eye and lied to her about Lisa Page?"

The House chamber quickly broke out into pandemonium, with fellow lawmakers shouting "Mr. chairman, this is outrageous!", "Shame on you!", and "This is intolerable harassment of a witness!" over each other.

Rep. Bonnie Watson Coleman of New Jersey even yelled "You need your medication!" to rebuke Gohmert. Rep. Jarrod Nadler of New York then raised a point of order, accusing Gohmert of violating House rules by "impugning the character" of a testifying witness.

The judiciary committee chairman, Rep. Bob Goodlatte of Virginia, was met with resounding boos when he responded that it was only against the House rules to impugn the character of a member of the House or the president of the United States.

Strzok fired back at Gohmert, saying, "your questioning of a look I would engage in with a family member who I have acknowledged hurting goes more towards a discussion of your character, and what you stand for, and is going inside you, than mine."

Page and Strzok exchanged text messages that were critical of then-presidential candidate Donald Trump during the 2016 election. At the time, Strzok was on the FBI team investigating Hillary Clinton's use of a private email server. Strzok was taken off the special counsel Robert Mueller's probe into Russian election meddling when the text messages were uncovered.

An in-depth report conducted by the Department of Justice's inspector general found no evidence that the political views of the agents influenced the probe, but Trump and other Republicans have not relented in their efforts to accuse the FBI of bias.

Strzok previously testified for several hours in a closed-door session with lawmakers in June, and Trump has continued to attack him and Page on Twitter.

Watch the full exchange between Gohmert and Strzok below:

Correction: A previous version of this article mis-identified the lawmaker who said “do you need your medication?” as Rep. Sheila Jackson-Lee of Texas. It was Rep. Bonnie Watson Coleman of New Jersey.