Former Trump White House counsel Donald McGahn is expected to answer questions “as soon as possible” in a closed session with House lawmakers about former special counsel Robert S. Mueller III’s investigation, according to an agreement outlined in court filings Wednesday night.

McGahn will appear before the House Judiciary Committee after House Democrats sued to enforce a 2019 subpoena for his testimony about whether President Donald Trump obstructed justice in Mueller’s Russia investigation.

The agreement, negotiated by President Biden’s Justice Department and House lawyers, is intended to end the long-running litigation over McGahn’s testimony that the Trump administration had blocked. But it leaves unresolved the question of whether a congressional committee can compel the testimony of a close presidential adviser.

While the Biden administration may not have been inclined to block testimony from Trump’s former legal counsel, the White House has preserved its ability to argue in a future case that its own close advisers are shielded from being forced to testify before Congress.

It is unclear what new information lawmakers will obtain from McGahn’s interview that will be conducted more than two years after the subpoena was issued and now that Trump has left office. And Trump himself could still try to intervene and attempt to disrupt the McGahn deal.

But House lawmakers thought it was important to reinforce Congress’s oversight powers and the principle that congressional subpoenas can’t be ignored. House Judiciary Chairman Jerrold Nadler (D-N.Y.) said in a statement that the agreement “satisfies our subpoena, protects the Committee’s constitutional duty to conduct oversight in the future, and safeguards sensitive executive branch prerogatives.”

A transcript of McGahn’s interview will be “promptly provided to all involved parties” for review before it is released publicly, according to the court filing.

The scope of McGahn’s session will be limited to the public portions of the Mueller report related to McGahn, and he can decline to answer questions deemed outside those parameters. Justice Department lawyers attending the interview can also direct McGahn not to answer and assert executive privilege.

McGahn may be asked, for instance, whether Mueller’s report on Russian interference in the 2016 election accurately reflected McGahn’s statements to the special counsel’s office.

Lawmakers have said they considered McGahn the “most important” witness in the investigation of whether Trump obstructed justice by trying to shut down the Mueller inquiry, a claim Trump has denied. Mueller’s 448-page report mentioned McGahn’s statements more than 160 times.

McGahn’s attorney did not respond to requests for comment, but a representative for McGahn participated in the negotiations, according to a person familiar with the discussions who spoke on the condition of anonymity because the person was not authorized to discuss the sensitive talks.

McGahn’s attorney previously said McGahn does not believe he witnessed any violation of law and that Trump instructed him to cooperate fully with Mueller but not to testify without an agreement between the White House and the committee.

Trump was not a party to the agreement, and a Trump spokesman did not return messages seeking comment on the deal.

The House Judiciary Committee initially subpoenaed McGahn in 2019. At the time, the Trump White House directed McGahn to disregard the subpoena and said that key presidential advisers are “absolutely immune from compelled congressional testimony.” The House went to court to enforce the subpoena.

U.S. District Judge Ketanji Brown Jackson rejected the Trump administration’s blanket claim of immunity. In August, the full U.S. Court of Appeals for the District of Columbia Circuit sided 7 to 2 with House Democrats in finding that lawmakers have standing to sue.

But a three-judge panel subsequently invalidated the subpoena on different legal grounds. The case was slated to return to the full D.C. Circuit next week. The panel said despite the injury to Congress, lawmakers had not expressly authorized Congress to sue to enforce its subpoenas.

Under the new agreement, the committee will ask the D.C. Circuit to dissolve that panel opinion. While the Biden administration “believes that the panel opinion was correct,” the court filing states, it has agreed to have the ruling vacated because the parties were able to strike a deal.

Irvin B. Nathan, who was House general counsel from 2007 to 2010, said Thursday he is “disappointed in DOJ for persisting in this position” because it will allow the Biden administration to argue in the future that the House has no cause of action to sue.

As counsel to House Speaker Nancy Pelosi (D-Calif.), Nathan battled the George W. Bush administration over similar requests for information. The House went to court over a subpoena for testimony from former White House counsel Harriet Miers about the motivations behind the firing of nine U.S. attorneys. The issue wasn’t resolved until the start of the Obama administration, in an agreement that provided a road map for the McGahn deal, according to the person familiar with the settlement talks.

Nathan urged Congress to pass legislation clearly authorizing such lawsuits and requiring the courts to expedite review so that testimony can be obtained quickly enough to be relevant and useful to lawmakers.

Rep. Ted Lieu (D-Calif.), a member of the Judiciary Committee, and other Democrats have introduced legislation that would levy penalties on officials who defy congressional subpoenas. Separate legislation with broad backing from Democrats would instruct federal courts to expedite consideration of cases involving congressional subpoenas.

Lieu said Thursday he looks forward to questioning McGahn. While generally pleased with the announced settlement, Lieu expressed displeasure with the part of the agreement in which the Justice Department expresses the view that the appeals panel decision was correct.

“I think the Justice Department is wrong,” Lieu said. “They haven’t learned their lesson that if you neuter congressional oversight, you can completely render Congress ineffective.”

The Justice Department declined to comment.