In a victory for President Trump, an appellate court ruled Friday that it wouldn't enforce a congressional subpoena to compel former White House counsel Don McGahn to testify before House lawmakers.

The U.S. Court of Appeals for the District of Columbia Circuit ruled 2-1 that it doesn't have the authority to decide the case, essentially making congressional subpoenas to the White House invalid. House Democrats had wanted McGahn to testify amid its investigation into whether Trump attempted to obstruct Special Counsel Robert Mueller's Russia investigation.

"If we order McGahn to testify, what happens next? McGahn, compelled to appear, asserts executive privilege in response to the Committee’s questions," Judge Thomas Griffith, an appointee of President George W. Bush, wrote in the opinion.

Then-White House counsel Don McGahn listens as Supreme court nominee Brett Kavanaugh testifies before the Senate Judiciary Committee on Capitol Hill in Washington. In a setback for Democrats in Congress, a federal appeals court has ruled that judges have no role to play in the subpoena fight between the House of Representatives and the Trump administration over the testimony of high-ranking officials. (Saul Loeb/Pool Photo via AP, File)

"The Committee finds those assertions baseless," he continued. "In that case, the Committee assures us, it would come right back to court to make McGahn talk. The walk from the Capitol to our courthouse is a short one, and if we resolve this case today, we can expect Congress’s lawyers to make the trip often."

The subpoena for McGahn to appear before lawmakers prompted a clash between the executive and legislative branches, with Trump claiming that he can block witnesses from talking to Congress. The Justice Department argued that presidential advisers had "absolute immunity" from speaking to Congress.

The DOJ said it was pleased with the ruling, saying the court recognized "that the House of Representatives cannot invoke the power of the courts in its political disputes with the Executive Branch.

"Suits like this one are without precedent in our Nation’s history and are inconsistent with the Constitution’s design. The D.C. Circuit’s cogent opinion affirms this fundamental principle," the statement continued.

The House Judiciary Committee subpoenaed McGahn on April 22, but the White House blocked his appearance. The obstruction probe coincided with an impeachment inquiry into Trump's dealings with Ukraine.

He was impeached in the House and acquitted earlier this month in the Senate. The House said it still wants to question McGahn about potential obstruction on Trump's part during the investigation into Russian meddling in the 2016 presidential election.

In Mueller's report, McGahn's name appears more than 150 times in reference to Trump's alleged attempts to hinder the investigation, Politico reported.

In the court's lone dissenting vote, Judge Judith Rogers said the court's refusal to enforce the subpoena stripped the House of impeachment powers since the request for his testimony came during the impeachment inquiry, the politics website reported.

“In the context of impeachment, when the accuracy and thoroughness of the investigation may well determine whether the President remains in office, the House’s need for information is at its zenith,” wrote Rogers, a Bill Clinton appointee.

In a lawsuit filed the  House Judiciary Committee over the summer, McGahn was called  "most important witness, other than the President, to the key events that are the focus of the Judiciary Committee’s investigation" into Russian interference.

McGahn was a star witness in Special Counsel Robert Mueller's report who — under Trump's orders — refused to release documents or testify before the panel. The Democratic lawsuit challenged the White House rationale that McGahn and other witnesses can defy subpoenas.

CLICK HERE TO GET THE FOX NEWS APP

The Trump administration has argued that, under executive immunity, Congress may not constitutionally compel senior presidential advisers to testify about their official duties.

Fox News Gregg Re contributed to this report.