WASHINGTON -- A judge on Friday ordered the Justice Department to give the House secret grand jury testimony from special counsel Robert Mueller's Russia investigation, handing a victory to Democrats as they gather evidence for the impeachment inquiry against President Donald Trump.

In a ruling that also affirmed the legality of the impeachment inquiry itself, U.S. District Judge Beryl Howell ordered the department to turn over the materials by Oct. 30. A Justice Department spokeswoman said it was reviewing the decision. The administration can appeal.

The ruling in favour of the House Judiciary Committee comes as Democrats gather closed-door testimony from current and former government officials about the Trump administration's efforts to get Ukraine to investigate political rival Joe Biden. The Mueller materials could reveal previously hidden details to lawmakers about Trump's actions during the 2016 election and become part of the impeachment push.

The material covered by Howell's order consists of redacted grand jury testimony mentioned in Mueller's report. The Justice Department says that information is the only piece of the document that key lawmakers have not had access to.

Democrats believe the still-redacted information could shed new light on key episodes of the investigation, including discussions Trump is reported to have had with associates about the release of stolen emails during the campaign and conversations about a 2016 Trump Tower meeting at which Trump's eldest son expected to receive damaging information about Hillary Clinton. The judge said the materials could help lawmakers as they decide which witnesses to call for an impeachment inquiry and what additional lines of investigation should be pursued.

In a 75-page ruling accompanying the order, Howell slashed through many of the administration's arguments for withholding materials from Congress, including the need for continued secrecy.

"The reality is that DOJ and the White House have been openly stonewalling the House's efforts to get information by subpoena and by agreement, and the White House has flatly stated that the Administration will not co-operate with congressional requests for information," Howell wrote.

While the Justice Department said it could not provide grand jury material under existing law, "DOJ is wrong," she wrote. And though the White House and its Republican allies argued impeachment is illegitimate without a formal vote, the judge said: "A House resolution has never, in fact, been required."

The judge also rejected the Justice Department's argument that impeachment does not qualify as a "judicial proceeding." That distinction matters because, though grand jury testimony is ordinarily secret, one exemption that allows it to be legally disclosed is in connection with a judicial proceeding.

"To the extent the House's role in the impeachment context is to investigate misconduct by the President and ascertain whether that conduct amounts to an impeachable offence warranting removal from office, the House performs a function somewhat akin to a grand jury," the judge wrote.

Rep. Jerrold Nadler, the Democratic chairman of the House Judiciary Committee, said he was pleased by the ruling.

"The court's thoughtful ruling recognizes that our impeachment inquiry fully comports with the Constitution and thoroughly rejects the spurious White House claims to the contrary," Nadler said in a statement. "This grand jury information that the Administration has tried to block the House from seeing will be critical to our work."

House Speaker Nancy Pelosi said the ruling was "another blow to President Trump's attempt to put himself above the law."

"This critical court ruling affirms Congress's authority to expose the truth for the American people. Most importantly, the Court recognized the House's right to obtain grand jury information pursuant to its impeachment inquiry," Pelosi said.

Justice Department lawyers argued against providing the materials at a hearing earlier this month. They pointed out that House Democrats already had significant evidence from Mueller's investigation, including copies of summaries of FBI witness interviews. But the judge said that information is no substitute for the actual grand jury testimony.

"To insure most effectively against being misled, HJC must have access to all essential pieces of testimony by witnesses, including testimony given under oath to the grand jury," Howell said, referring to the House Judiciary Committee.

"Additionally, for purposes of assessing and following up on the Mueller Report's conclusions, the full Report is needed: the grand jury material may offer unique insights, insights not contained in the rest of the Report, congressional testimony" or FBI reports, she added.

The Mueller report found insufficient evidence to establish a criminal conspiracy between Russia and the 2016 Trump campaign. It also examined multiple episodes in which Trump sought to thwart the investigation and pointedly determined that he could not be exonerated on obstruction of justice allegations.

------

Associated Press writer Michael Balsamo contributed to this report.