Former Deputy Attorney General Rod Rosenstein said it was his call to release hundreds of politically charged text messages between former FBI agent Peter Strzok and former FBI lawyer Lisa Page to the media, according to a Friday court filing by the Department of Justice (DOJ).

In his declaration, Rosenstein explained he did not see any legitimate reason to withhold the text messages because they were sent on government phones and subject to FBI review. He also said they were being sought by the House Judiciary Committee and the Senate, for oversight reasons.

"I learned that the text messages were ready for release to the Senate and House committees that had requested them, there was no basis to withhold them, and they were arguably relevant to the Judiciary Committee's oversight hearings," he wrote, according to the DOJ filing.

"[The texts] were sent on government phones with the knowledge that they were subject to review by FBI; [and] were so inappropriate and intertwined with their FBI work that they raised concerns about political bias influencing official duties," Rosenstein said.

STRZOK CLAIMS ANTI-TRUMP TEXTS PROTECTED BY FIRST AMENDMENT, ADMINISTRATION VIOLATED HIS RIGHTS

Rosenstein said he released the text messages in their entirety on Dec. 12, 2017, to avoid selective leaking by federal lawmakers, who were set to receive the texts the next day.

"If I had believed the disclosure to was prohibited by the Privacy Act, I would have ordered department employees not to make the disclosure," he wrote.

The Justice Department argued that Rosenstein did his due diligence by having his aides consult with the DOJ's top privacy official Peter Winn on the release of the text messages, and cannot be held responsible for violating the Privacy Act because there was no willful intent.

"Even if [the] Plaintiff could show that the disclosure was somehow inconsistent with the Privacy Act -- the Department did not intentionally or willfully violate the statute," the court filings read.

LISA PAGE SUSES FBI AND DOJ, CITING 'COST OF THERAPY' AFTER TRUMP MOCKED HER SALACIOUS TEXT MESSAGES

Strzok and Page, who were both members of former Special Counsel Robert Mueller's Russia investigation team, were caught exchanging messages that were disparaging of President Trump and highly partisan in nature throughout 2016.

They discussed a possible "insurance policy" if Trump won the presidency, and referred to him as a "loathsome human" and an "idiot." They were also engaged in an extramarital affair with one another during the period in question.

Page, who eventually resigned from the Bureau, sued the DOJ last month over the release of the text messages, claiming it violated the Federal Privacy Act. She said she has suffered numerous damages including therapy costs and "permanent loss of earning capacity due to reputational damage."

Strzok also sued the DOJ last month, claiming his First Amendment Rights had been violated. He is seeking reinstatement on the basis that his firing was unconstitutional. Rosenstein's declaration was part of the government's defense in Strzok's lawsuit.

CLICK HERE TO GET THE FOX NEWS APP

During their time in the public eye, Trump has made both Strzok and Page frequent political targets and recently discussed their ongoing issues on Twitter.

"When Lisa Page, the lover of Peter Strzok, talks about being “crushed”, and how innocent she is, ask her to read Peter’s “Insurance Policy” text, to her, just in case Hillary loses," he Tweeted last month. "Also, why were the lovers text messages scrubbed after he left Mueller. Where are they Lisa?"

Rosenstein resigned from his post with the DOJ in April and is now with a corporate law firm in Washington, D.C.

Fox News' Gregg Re, Dom Calicchio and Brooke Singman contributed to this report