Hundreds of text messages released overnight between two FBI officials who helped investigate Donald Trump’s presidential campaign last year show the agents expressing deep concern that a potential Trump victory was “terrifying.”

The texts were released to the House Judiciary Committee ahead of a hearing Wednesday with Deputy Attorney General Rod Rosenstein, who is sure to be peppered with questions about the messages. Republicans have pointed to them in raising questions about the objectivity of both the bureau and the Mueller probe.

A top counterintelligence agent, Peter Strzok, exchanged the messages with Lisa Page, a senior F.B.I. lawyer. Some messages criticized Mrs. Clinton’s team, the Obama administration, Congress and other Democrats. But the two appeared appalled at some of Mr. Trump’s comments during the campaign and feared that he would politicize the F.B.I.

For example, after Mr. Trump made an apparent sexual allusion related to the size of his hands, Ms. Page wrote: “This man cannot be president.” In another exchange, Mr. Strzok wrote of a potential Trump presidency, “I’m scared for our organization.” He also referred to Mr. Trump as a “douche.” The messages were turned over to Congress and obtained by The New York Times.

In one exchange from August 2016, Page forwarded a Donald Trump-related article to Strzok, writing: “Maybe you’re meant to stay where you are because you’re meant to protect the country from that menace.”

Mr. Strzok went on to become an investigator for the special counsel, Robert S. Mueller. But over the summer, Mr. Mueller removed Mr. Strzok from his team as soon as he became aware of the texts.

The Justice Department’s inspector general, Michael E. Horowitz, is investigating the texts as part of a wide-ranging inquiry into how the F.B.I. handled its investigations into Mrs. Clinton’s personal email server and of the Trump campaign’s ties to Russia.

RELATED: Top Intel Dem Warns Jeff Sessions Is Engaged In Potential Cover Up Of Trump-Russia Collusion.

It is highly unusual for the government to release these types of documents until such an investigation is complete. The move caught internal investigators by surprise.

F.B.I. regulations allow agents to express opinions “as an individual privately and publicly on political subjects and candidates.”

On July 27, Ms. Page wrote, “She just has to win now. I’m not going to lie, I got a flash of nervousness yesterday about Trump.” That text message was sent after the Clinton investigation had been closed. Days later, the F.B.I. began investigating possible coordination between Russian officials and the Trump campaign.

The two F.B.I. officials also criticized Mr. Trump as the Russia investigation was continuing. They told internal investigators that their comments were influenced by the troubling evidence they were seeing about Mr. Trump’s campaign ties to Russia, according to a person familiar with the internal investigation.

The Justice Department’s decision to provide the texts to Capitol Hill in the middle of an investigation is also likely to attract scrutiny from Democrats. Mr. Trump has criticized the attorney general, Jeff Sessions, for not doing enough to protect him on the Russia investigation.

By releasing the texts, Jeff Sessions has given Mr. Trump both a shield and a sword in his political battle with Mr. Mueller’s investigators.

RELATED: Mueller Zeroes In On Trump’s Effort To Cover Up Sally Yates Warning About Flynn. ShareTweet