FBI director Chris Wray was deposed under oath this week by lawyers for former FBI agent Peter Strzok and former FBI lawyer Lisa Page, who are separately suing the federal government over their departures from the FBI, which came after months of public ridicule by then-president Donald Trump and his allies.
The closed-door deposition on Tuesday, confirmed by two people familiar with the matter, could pave the way for the sworn deposition of Trump himself in the coming weeks.
Many of Trump's attacks were based on private text messages between Strzok and Page, discovered by internal investigators, that reflected strong anti-Trump sentiment.
"There is ample evidence that President Trump has long been fixated on -- and in some instances personally involved in -- matters relating to Ms. Page and Mr. Strzok," lawyers for Page said in court.
In 2016, Strzok, a veteran counterintelligence agent, helped launched the FBI's investigation into alleged ties between Trump's presidential campaign and Russia -- a probe Trump has derided as a "hoax."
Strzok initially joined special counsel Robert Mueller's team when Mueller took over the probe, but Strzok was reassigned after internal investigators discovered the private text messages.
Page resigned from the FBI in May 2018, and Strzok was fired from the agency three months later. Though they filed separate lawsuits, their legal teams are working together to gather evidence and conduct depositions.
In her lawsuit, Page claims the Justice Department and FBI violated the Privacy Act by publicly releasing her private text messages, which she says were used "to promote the false narrative that [she] and others at the FBI were biased against President Trump, had conspired to undermine him, and otherwise had engaged in allegedly criminal acts, including treason."
In his own lawsuit, Strzok claims wrongful termination, alleging the FBI and Justice Department violated his First Amendment rights, and that his firing "was the result of a long and public campaign by President Trump and his allies to vilify Strzok and pressure the agency to terminate him."
The Justice Department has defended its actions, saying in court that the text messages were lawfully made public, that the text messages "risked serious harm to the FBI's mission by undermining its perception of professionalism and impartiality," and that any First Amendment rights were consequently outweighed by "the FBI's interests in ... protecting its reputation as a trusted, non-partisan investigative institution."
Both lawsuits cite an array of tweets and public statements from Trump in the run-up to Page's resignation and Strzok's firing from the FBI.
"I am amazed that Peter Strzok is still at the FBI, and so is everybody else ... Peter Strzok should have been fired a long time ago," Trump said at the White House in June 2018, two months before Strzok was fired.
Ahead of Strzok's termination, Trump and Wray both attended meetings that included discussions of Strzok and Page's employment status. Those meetings were the focus of Wray's deposition on Tuesday, which lasted two hours, according to court records and one person involved in the matter.
At least one of the former FBI employees was inside the room with Wray during the deposition this week, ABC News was told.
The judge overseeing both cases, U.S. District Court Judge Amy Berman Jackson, said that any deposition of Trump would have to be limited to two hours.
The former president's legal team has not asserted executive privilege over conversations that related to Strzok's employment status, per court filings.
Judge Jackson has called Trump "a key witness to what took place."
Page and Strzok had wanted to depose Trump before deposing Wray, but -- after much legal wrangling -- Berman Jackson denied that request, waiting to see if Trump's deposition would still be necessary after hearing testimony from Wray.
Other former senior FBI and Justice Department officials have already been deposed.
In suing the Justice Department and FBI, Strzok is seeking reinstatement, backpay, and unspecified monetary damages. Page is also seeking unspecified monetary damages, saying continued attacks from Trump and his allies have caused her "permanent loss of earning capacity due to reputational damage" and forced her to pay for therapy "to cope with unwanted national media exposure and harassment."
Though a review of the broader Russia-related probe by the Justice Department's inspector general found no evidence "that political bias or improper motivation influenced the decisions" made by Strzok and others, a more recent report by special counsel John Durham said "confirmation bias" led FBI officials to take unnecessarily intrusive steps. Still, according to Durham's report, the evidence gathered did not support charges against Strzok or any other senior FBI official.
The FBI declined to comment on the matter to ABC News.