Washington CNN  — 

Embattled FBI agent Peter Strzok on Thursday defended a controversial text he sent disparaging Donald Trump during the 2016 presidential campaign by saying it was written in response to “then-candidate Trump insulting the immigrant family of a fallen war hero.”

The text exchange at issue was detailed in a recently-released Justice Department internal watchdog report, which revealed that on August 8, 2016, now ex-FBI lawyer Lisa Page wrote in a text, Trump is “not ever going to become president, right? Right?!” to which Strzok replied, “No. No he’s not. We’ll stop it.”

Republicans have criticized the message and seized on the exchange to argue that it demonstrates evidence of anti-Trump bias at the FBI.

During a contentious congressional hearing on Thursday, Strzok attempted to explain why he sent the message in the first place.

“In terms of the texts that ‘we will stop it,’ you need to understand that was written late at night, off-the-cuff, and it was in response to a series of events that included then-candidate Trump insulting the immigrant family of a fallen war hero, and my presumption, based on that horrible, disgusting behavior that the American population would not elect somebody demonstrating that behavior to be President of the United States,” Strzok said.

At the end of July 2016 — just days before the August 8 text exchange – Trump shot back at Gold Star parents Khizr and Ghazala Khan, whose son US Army Capt. Humayun Khan was killed in 2004, after Khizr criticized Trump at the Democratic National Convention.

Trump responded by questioning why Ghazala, who stood at her husband’s side during the DNC speech, didn’t speak herself. “She probably, maybe she wasn’t allowed to have anything to say. You tell me,” Trump said during an interview with ABC News’s George Stephanopoulos.

Strzok said on Thursday that his message, “was in no way, unequivocally, any suggestion that me, the FBI, would take any action whatsoever to improperly impact the electoral process, for any candidate,” and later said that “at no time in any of these texts did those personal beliefs ever enter into the realm of any action I took.”

At the conclusion of his remarks, several Democratic members of the committees audibly cheered.

CNN’s Liz Stark, Laura Jarrett, David Siegel, David Shortell and Jeremy Herb contributed to this report.