Former Deputy Attorney General Rod Rosenstein authorized the release of private text messages between two former FBI employees critical to President Donald Trump, according to a Justice Department court filing released late Friday night.

The text messages, released to media two years ago, were between FBI agent Peter Strzok and FBI lawyer Lisa Page who were assigned to the investigation into collusion between Russia and the Trump campaign. The two referred to Trump as an “idiot” and expressed support for Democratic presidential nominee Hillary Clinton. The texts have fueled allegations of FBI bias by supporters of the Trump Administration and the President himself.

The 375 messages were released to media the day before Rosenstein was scheduled to testify before Congress on Dec. 13, 2017.

The latest court filing in the lawsuit brought against the Department of Justice (DOJ) by Strzok — which claims the DOJ violated the Privacy Act by releasing the text messages — reveals that Rosenstein decided to release the messages because of the likelihood that the messages would be made public by members of Congress. Page has filed a separate but similar lawsuit.

“The disclosure obviously would adversely affect public confidence in the FBI, but providing the most egregious messages in one package would avoid the additional harm of prolonged selective disclosures and minimize the appearance of the Department concealing information that was embarrassing to the FBI,” wrote Rosenstein in a declaration filed with the DOJ on Friday.

Correction: Jan. 20, 2020

The original version of this story misstated Rod Rosenstein’s actions regarding how text message conversations were released to media. He authorized the release of the messages, he did not leak the messages.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Jasmine Aguilera at jasmine.aguilera@time.com.