WASHINGTON (AP) — A veteran FBI counterintelligence agent was removed from special counsel Robert Mueller’s team investigating Russian election meddling after the discovery of an exchange of text messages seen as potentially anti-President Donald Trump, a person familiar with the matter said Saturday.

The removal of the agent, who also had worked on the investigation of Hillary Clinton’s use of a private email server, occurred this summer. The person who discussed the matter with The Associated Press was not authorized to speak about it publicly by name and spoke on condition of anonymity.

Peter Carr, a spokesman for Mueller, said Mueller removed the agent, Peter Strzok, from the team “immediately upon learning of the allegations.” He would not elaborate on the nature of the accusations.

The swift removal almost certainly reflected a desire to insulate the investigators from any claims of political bias or favoritism. Trump and many of his supporters have at times sought to discredit the investigation, in part by claiming a close relationship between Mueller and fired FBI Director James Comey and by pointing to political contributions to Democratic candidates made by some lawyers on the team.

The existence of the text messages was brought to the attention of Mueller’s office by the Justice Department inspector general’s office, which has been conducting a wide-ranging investigation of the FBI’s handling of the Clinton email case.

Mueller has been investigating whether Trump campaign associates coordinated with Russia to influence the o+utcome of the 2016 presidential election, and Strzok’s background in counterintelligence would have been seen as particularly valuable for a secretive FBI probe examining foreign contacts.

So far, four people have been charged as a result of Mueller’s investigation. The most recent criminal case was brought Friday when former national security adviser Michael Flynn pleaded guilty to lying to the FBI about his conversations with the Russian ambassador. He has agreed to cooperate with the investigation.

On Saturday, Trump tweeted that he “had to fire General Flynn because he lied to the Vice President and the FBI. He has pled guilty to those lies. It is a shame because his actions during the transition were lawful. There was nothing to hide!”

The tweet suggests that Trump was aware when he dismissed Flynn on Feb. 13 that he had lied to the FBI, which had interviewed him weeks earlier. Comey has said that Trump the following day brought up the Flynn investigation in private at the White House and told him that he hoped he could “let this go.”

The nature of the messages Strzok exchanged and with whom he communicated was not immediately clear. In his statement, Carr noted that an FBI lawyer, Lisa Page, had briefly been detailed to the team but left “before our office was aware of the allegations.”

Phone numbers for Strzok and Page could not immediately be found, and the FBI declined to comment.

The New York Times first reported the reason for the agent’s removal. ABC News had reported in August that Strzok had left the team.

Strzok was present during Clinton’s July 2016 interview with the FBI about her use of a private email server while she was secretary of state, according to an unclassified summary of the interview commonly referred to as an FBI 302 form. Several other FBI agents and officials from the Justice Department also attended. The investigation was concluded without criminal charges days later.

On Saturday, the Justice Department’s inspector general’s office released a statement confirming that it was continuing to review unspecified allegations made about the department’s and the FBI’s actions “in advance of the 2016 election.”

“The OIG has been reviewing allegations involving communications between certain individuals, and will report its findings regarding those allegations promptly upon completion of the review of them,” the inspector general’s office said.

The statement didn’t refer to any agents or officials by name.

__

Associated Press writer Chad Day contributed to this report.