Robert Mueller, the special counsel leading the Justice Department’s Russia collusion investigation, removed an FBI agent from the case over possible anti-Trump text messages, Fox News confirmed Saturday.

The agent has been identified as Peter Strzok, one of the agency’s most experienced and trusted counterintelligence investigators, said the New York Times, which first reported the dismissal.

The allegations came to light after the Justice Department’s inspector general started examining Strzok's messages.

“Immediately upon learning of the allegations, the Special Counsel’s Office removed Peter Strzok from the investigation,” Peter Carr, a spokesman for Mueller, confirmed to Fox News.

Strzok also worked on the FBI investigation last year into whether then-Democratic presidential nominee Hillary Clinton mishandled classified information through her use of private email servers while secretary of State.

During this investigation, Strzok was allegedly involved in an extra-marital affair with FBI lawyer Lisa Page, according to The Washington Post.

“Lisa Page completed her brief detail and had returned to the FBI weeks before our office was aware of the allegations,” Carr also said in his statement, though it was not immediately clear to which allegations he was referring.

Mueller was appointed in May to lead the Justice Department's investigation into whether President Trump or any of his associates colluded with Russian during the 2016 White House race.

Mueller took the assignment after Attorney General Jeff Sessions recused himself from the probe because of campaign involvement, per DOJ regulations.

Strzok was reportedly reassigned this past summer from the Mueller investigation to the FBI’s human resources department, according to The Times.

A lawyer for Storzok declined to comment.

Fox News' Brooke Singman and Jennifer Bowmen contributed to this report.