WASHINGTON (AP) — The Justice Department must give Congress secret grand jury testimony from special counsel Robert Mueller’s Russia investigation, a federal appeals court ruled Tuesday, giving the House a significant win in a separation-of-powers clash with the Trump administration.

The three-judge panel said in a 2-1 opinion that the House Judiciary Committee’s need for the material in its investigations of President Donald Trump outweighed the Justice Department’s interests in keeping the testimony secret. The opinion authorizes access to information that Democrats have sought since the conclusion of Mueller’s investigation, enabling lawmakers to review previously-undisclosed details from the two-year Russia probe.

Writing for the majority, Judge Judith Rogers said that with Mueller himself having “stopped short” of reaching conclusions about Trump’s conduct to avoid stepping on the House’s impeachment power, the committee was able to persuasively argue that it needed access to the underlying grand jury material to make its own determinations about the president’s actions.

House Speaker Nancy Pelosi called the ruling a rejection of the president’s “insistence that he is above the law” and a further rebuke to Attorney General William Barr.

“Courts must take care not to second-guess the manner in which the House plans to proceed with its impeachment investigation or interfere with the House’s sole power of impeachment,” Rogers wrote, calling the committee’s request for the grand jury material “directly linked to its need to evaluate the conclusions reached and not reached by the Special Counsel.”

House Democrats cheered the opinion, with Rep. Jerrold Nadler, the Judiciary Committee chairman, saying the panel “remains committed to holding the President accountable to the rule of law and preventing improper interference in law enforcement investigations.”

House Speaker Nancy Pelosi called the ruling a rejection of the president’s “insistence that he is above the law” and a further rebuke to Attorney General William Barr. Last week, another federal judge scolded Barr in a separate case for what he said were misleading public statements by the attorney general about Mueller’s findings.

Judge Thomas Griffith issued a separate concurring opinion in Tuesday’s appeals court decision. Judge Neomi Rao, a Trump appointee, dissented, suggesting that the need for the testimony could have waned after Trump’s acquittal at a Senate impeachment trial last month.

“After all, the Committee sought these materials preliminary to an impeachment proceeding and the Senate impeachment trial has concluded. Why is this controversy not moot?” Rao wrote.

It is unclear when the materials might actually be turned over. The Trump administration can ask the full appeals court to rehear the case, and can appeal to the Supreme Court. Justice Department spokeswoman Kerri Kupec said the department was reviewing the decision.

The ruling softens the blow of a loss the House endured two weeks ago when judges on the same court refused to force former White House counsel Don McGahn to testify before Congress. The split decisions leave neither the administration nor Congress with a clear upper hand in the ongoing inter-branch dispute that federal courts have been grappling with.

Though the ruling is a major win for Democrats who have fought the Justice Department for nearly a year, it’s unclear what the House will actually do with the material.

Lawyers for the Democrats have said the grand jury material could potentially be used for additional articles of impeachment, though the Senate impeachment trial over the president’s interactions with Ukraine ended weeks ago in an acquittal.

The case is one of several disputes between the Trump administration and Congress that courts have grappled with in recent months.

The two sides had been similarly at odds on the question of whether McGahn could be forced to testify about Trump’s behavior during the Russia investigation. The appeals court ruled in a recent 2-1 decision that judges had no role to play in that dispute and dismissed the case.

Mueller issued a 448-page report last April that detailed multiple interactions between the 2016 Trump campaign and Russia and that examined several episodes involving the president for potential obstruction of justice. Mueller said his team did not find sufficient evidence to establish a criminal conspiracy between the campaign and the Kremlin to tip the election, though pointedly noted that he could not exonerate the president for obstruction.

Portions of the report were blacked out, including grand jury testimony and material that Mueller said could harm ongoing investigations or infringe on the privacy of third parties.

Grand jury testimony is typically treated as secret, in part to protect the privacy of people who are not charged or are considered peripheral to a criminal investigation. But several exceptions allow for the material to be turned over, including if it is in connection with a judicial proceeding.

The House argued that the impeachment inquiry met that definition, and it sought grand jury testimony that Mueller referenced in his report. Chief U.S. District Judge Beryl Howell sided with the House last October in ordering that the material be turned over.

The Justice Department appealed that decision, with lawyers arguing that the material sought by the House had no relevance to the impeachment inquiry and that the House already had ample information about the investigation.

Several dozen witnesses appeared before Mueller’s grand jury, including former Trump campaign chairman Paul Manafort.

Associated Press writer Mark Sherman in Washington contributed to this report.