WASHINGTON — Deputy Attorney General Rod J. Rosenstein faced sharp questioning from congressional Republicans on Wednesday following revelations that two officials assigned to the Justice Department’s Russia probe exchanged text messages critical of Donald Trump during last year’s campaign.
Rosenstein, the former U.S. attorney for Maryland, defended both the investigation and Robert S. Mueller III, the special counsel he appointed in May to oversee it. Testifying before the House Judiciary Committee, Rosenstein said he has seen no reason to fire Mueller from that job.
The hearing came hours after the disclosure of text messages between an FBI counterintelligence agent assigned to Mueller’s team and an FBI lawyer on the same detail. The messages, sent before Mueller was appointed as special counsel, show the two using words such as “idiot” and “loathsome” to describe Trump.
One wrote on Election Day that the prospect of a Trump victory was “terrifying.”
Rosenstein, sworn in as the No. 2 official in the Justice Department in April, has drawn both ire and praise from Democrats and from Republicans during his brief, tumultuous tenure. Democrats were livid at his role in the firing of former FBI Director James B. Comey in May. Republicans, meanwhile, have questioned his handling of the Russia case.
Pressed by lawmakers during a hearing that ran over three hours, Rosenstein said he had not seen any reason to fire Mueller — a move some speculate Trump has considered.
Trump has called the probe a “witch hunt.” Rosenstein claimed not to understand the words, but disputed them.
“The special counsel’s investigation is not a witch hunt,” Rosenstein said. “The independence and integrity of the investigation is not going to be affected by anything that anybody says.”
Still, the disclosure of messages critical of Trump has given ammunition to critics of the investigation, allowing them to claim that it has been tainted by political bias. The president himself has made that argument, reposting a message on Twitter this month that the texts demonstrated “politicization” at the department.
Peter Strzok, a veteran FBI counterintelligence agent, was removed over the summer from the group of agents and prosecutors investigating potential coordination between Russia and Trump’s campaign following the discovery of text messages exchanged with Lisa Page, an FBI lawyer who was also detailed to the group.
Strzok was also deeply involved in the FBI’s inquiry into Democratic nominee Hillary Clinton’s use of a private email server to conduct government business when she was secretary of state.
Rep. Bob Goodlatte, the Virginia Republican who chairs the Judiciary Committee, described the messages as “deeply troubling.”
“Department of Justice investigations must not be tainted by individuals imposing their own political prejudices,” Goodlatte said. “These text messages prove what we all suspected: High-ranking FBI officials involved in the Clinton investigation were personally invested in the outcome of the election.”
The text messages showed the two officials were also critical of Democrats. One described former Maryland Gov. Martin O’Malley as a “douche,” according to a report in Politico. Another described him as a “freak show,” according to multiple reports.
Sen. Bernie Sanders also a target. “I just saw my first Bernie Sanders bumper sticker. Made me want to key the car," one of the officials wrote.
Sanders and O’Malley both ran against Clinton for the Democratic presidential nomination.
Rosenstein responded to the criticism Wednesday in part by saying that Strzok was working on the Russia investigation prior to Mueller’s appointment and that he was removed as soon as the department became aware of the texts.
“We will ensure that no bias is reflected in any of the actions taken by the special counsel, or in any matter,” Rosenstein said. “When we have evidence of any inappropriate conduct, we’re going to take action on it.”
Rosenstein’s interactions with Capitol Hill have been an unusual study in politics. Republicans have sought to undermine the investigation and question the motives of both Rosenstein and Mueller, even though both of those men have long been Republicans.
Rosenstein was nominated U.S. attorney for Maryland by Republican President George W. Bush and was kept in the job by Democratic President Barack Obama.
Mueller, similarly, was nominated by Bush to a 10-year term to lead the FBI in 2001. When his term was up in 2011, Obama retained him for two more years.
Both men received broad, bipartisan support during their Senate confirmations. Mueller’s appointment as special counsel was praised by many Republicans in Congress at the time — not because they supported the investigation, but because they said they believed Mueller to be an honest broker.
Since then, however, critics have noted that several members of Mueller’s team have made political donations to Democrats, including Clinton.
Trump, meanwhile, opened the door to criticism of his own Justice Department by publicly questioning Attorney General Jeff Sessions’ decision to recuse himself in the Russian investigation. In an interview with The New York Times over the summer, Trump also criticized Rosenstein, saying he “is from Baltimore. There are very few Republicans in Baltimore, if any.”
While Rosenstein worked in Baltimore, he was born in Philadelphia and lived in Montgomery County while serving as U.S. attorney.
Mueller’s probe has led to two guilty pleas so far, including one this month by former Trump national security adviser Michael T. Flynn.
In response to Democratic questioning, Rosenstein acknowledged that reporters were invited to the Justice Department to review the messages on Tuesday — an unusual step given that they were part of an ongoing watchdog report. But he said the decision was acceptable because the information was determined to be “appropriate for public release.”

Maryland Policy & Politics
“Our goal, congressman, is to make sure that it’s clear to you and the American people we are not concealing anything that is embarrassing to the FBI,” he said.
The messages — 375 were released Tuesday evening — cover a broad range of political topics. They include an exchange of news articles about the race, often alongside the officials’ commentary.
Some of the harshest comments were reserved for Trump.
The two then use words such as “idiot” and “awful” to characterize Trump.
In one exchange, Strzok wrote that “America will get what the voting public deserves.”
In another, on Oct. 18, 2016, Strzok wrote that “Trump is an [expletive] idiot, is unable to provide a coherent answer. I CAN'T PULL AWAY. WHAT THE [expletive] HAPPENED TO OUR COUNTRY??!?!”
The Associated Press contributed to this article.