The Department of Justice on Friday defended its decision to give a small group of reporters text messages that showed two FBI officials who were on special counsel Robert Mueller's team were politically opposed to President Trump.

Those texts messages between Peter Strzok and Lisa Page were made public in several press reports late Tuesday, including in the Washington Examiner. Strzok, who was part of the FBI's team investigating Hillary Clinton's email server before being added to Mueller's team, was having an alleged extramarital affair with Page, with whom he shared anti-Trump sentiments. Both have since been removed from Mueller's team, and are still part of an investigation by the Justice Department's Office of Inspector General.

The decision to give those texts to reporters drew complaints from Democrats and some news outlets that weren't included.

But in a series of tweets Friday afternoon, Justice Department chief spokeswoman Sarah Isgur Flores explained that the chairman and ranking members of the Senate and House Judiciary committees were provided the “opportunity” to see copies of the text messages "before any member of the media was given access to view the same copy by the Dept’s Office of Public Affairs.”

She reiterated that Deputy Attorney General Rod Rosenstein said before Congress on Wednesday that “after initial inquiries from Congress, the DAG consulted with the IG, and the IG determined that he had no objection to the Department providing the material to the Congressional committees that had requested it (discussion w IG was only about Congress).”

Then, after consulting with the Justice Department’s inspector general, senior career ethics advisors were also consulted, she said. They “determined that there were no legal or ethical concerns, including under the Privacy Act, that prohibited the release of the information to the public either by members of Congress or by the Department.”

Flores said some confusion may have happened because “other reporters may have had the same copies of texts outside of this process.”

But she stressed that “once we provided them to Congress, there was no legal or ethical obligation against sharing them w media.”

“So timeline in short: (1) Copies delivered to Congress, (2) Some media outlets are in possession of copies of texts (3) Department shows copies of texts to reporters working in the building," she wrote.

A reporter with Business Insider tweeted early Wednesday that she got confirmation “that the Justice Department invited reporters over to DOJ last night to look at the Strzok/Page texts — and report them out — in case they did not leak in time for Rosenstein's hearing today.”

Rosenstein faced questions about this before the House Judiciary Committee on Wednesday but defended the process.

On Friday morning, Rep. Matt Gaetz, R-Fla., told CNN that the DOJ was “forced” to release the text messages because House Intelligence Chairman Devin Nunes, R-Calif., “was about to subpoena them.”

Nunes’s office declined to comment.

Democrats on the House Judiciary Committee asked Flores in a letter later Thursday to explain who approved the invitation to the reporters and if she had asked Inspector General Michael Horowitz for permission to release the texts.