The top Republican on the House Judiciary Committee on Thursday released the transcript from a closed-door interview with former FBI counterintelligence official Peter Strzok in which he argued to a joint congressional panel that text messages he sent expressing disdain for Donald Trump had been misconstrued to be more disparaging than intended.

In the June interview, Strzok also vehemently objected to the Justice Department inspector general’s conclusion that he had prioritized the bureau’s Trump investigation, which he led, over an investigation into Hillary Clinton’s use of a private email server, which he joined midstream. Strzok argued that he “never took resources off one and put it onto the other” but that “a hostile foreign power . . . seeking to clandestinely influence our presidential election” was a far graver threat than the charge that Clinton was mishandling classified information.

Strzok, who played a leading role in the FBI’s concurrent probes of Trump and Clinton, exchanged anti-Trump text messages with then-FBI lawyer Lisa Page, with whom Strzok confirmed he was having an affair. He was removed from a senior role with special counsel Robert S. Mueller III’s team investigating Russian interference in the 2016 election over the substance of the texts, though he said no one ever asked him about the intent behind his messages while he was being reassigned.

Aitan Goelman, Strzok’s attorney, said in a statement Thursday: “Pete welcomes the release of the transcript of his closed-door testimony, which we have been calling for since he voluntarily testified last June. It is further evidence that, contrary to the impression that the President’s allies in Congress tried to create with their selective and often inaccurate leaks, Pete at all times discharged his duties honorably, patriotically, and without regard to his personal political opinions.”

In some of the messages — such as a 2016 text in which Strzok characterized the FBI’s Russia probe as an “insurance policy” in the event Trump won the election — Strzok said he had not meant to convey deep animus against Trump but instead to stress to Page that polls showing Trump was not likely to win “should not get in the way of us doing our job responsibly to protect the national security.”

Describing in vague terms the conversations at the FBI around the time the Russia investigation was opened, Strzok said there was debate about protecting a source, and Page argued that because it was unlikely Trump would get elected, investigators could move slowly and not put the source at risk. Strzok said he made the counterargument, that if Trump won and people alleged to be involved in nefarious activity were put in national security positions, “we might need to protect America by finding out whether these allegations are accurate or not and making sure that the government, President Trump in that case, was making special — or appropriate decisions.”

“If there’s an allegation, he, of all people, but everybody would want to know: if this is going on in my campaign I want you to tell me about it,” Strzok said.

Strzok waged a similar defense during a contentious public hearing in July of last year. But his comments in the transcript of the closed-door interview are the most thorough to date explaining a text Strzok sent Page saying they could not take the “risk” of Trump getting elected.

Strzok also explained a text of his from May 2017, in which he said he had “unfinished business” from the Clinton investigation he hoped to settle in the Trump probe, as a reference “to a much broader effort of the government of Russia to interfere with our presidential election” — because Russian operators were using the results of the Clinton investigation “in a way to disrupt our election.” Similarly, Strzok said, an August 2016 text in which Page urged him to stay in his job to “protect the country from that menace” — menace had been a reference to Russian operators, not to Trump.

Strzok said he “very much” regretted his text exchanges with Page, who also spoke with congressional investigators in July; a transcript of those proceedings was released earlier this week. Both characterized the messages as personal exchanges, strongly denying that they affected the work of the FBI.

Earlier this month, Rep. Douglas A. Collins (R-Ga.), the House Judiciary Committee’s ranking Republican, also released the transcript of an August interview with Justice Department official Bruce Ohr, who had contact with the author of a controversial dossier — partially funded by Clinton’s campaign and the Democratic National Committee — alleging that Trump had personal and financial ties in Russia. Collins said on the House floor Thursday that he intended to release additional transcripts from that GOP-led probe in the weeks ahead, in the name of transparency.

The transcript shows Strzok was asked about decisions made during the Clinton probe, including then-FBI Director James B. Comey’s efforts to draft a memo explaining his rationale for not prosecuting Clinton in advance of interviewing her. Strzok said he was aware of no similar effort to draft a memo explaining a potential decision to charge Clinton ahead of her interview.

Strzok also said Comey initially concluded Clinton had shown “gross negligence” in how she handled classified information — a finding that could lead to charges — but dialed that back to “extreme carelessness” by the time he finished his memo.

Asked in general terms whether he had “ever been part of the FBI’s efforts to infiltrate a U.S. political campaign” or “been part of an effort to put a spy in a U.S. political campaign,” Strzok said no.

Strzok also noted he was not sure how often the FBI briefed retired personnel about closed cases — as they did in the Clinton email investigation in late October 2016. It was after that call that Rudolph W. Giuliani went on TV claiming to have insider knowledge from FBI agents; Strzok said he knew of no agents talking to Giuliani.

Rosalind S. Helderman contributed to this report.