A federal appeals court on Wednesday dismissed a lawsuit challenging the legality of payments to President Donald Trump's hotels by foreigners during his tenure in the White House.
A three-judge panel of the U.S. Circuit Court of Appeals for the 4th Circuit unanimously ruled that the state of Maryland and the District of Columbia do not have legal standing to sue under a claim that Trump violated the so-called emoluments clause of the U.S. Constitution.
That clause, contained in Article 1 of the Constitution, bars government officeholders from accepting gifts from foreign officials.
On Monday, the Justice Department urged the D.C. Circuit Court of Appeals to dismiss that second suit.
In its ruling, the 4th Circuit appeals panel said that Washington and Maryland's interest in enforcing that clause "is so attenuated and abstract" that it raises the question of whether their lawsuit is an appropriate use of the court system.
The suit was the first ever to claim a president violated the emoluments clause, and the appeals panel said "not only is this suit extraordinary, it also has national significance and is of special consequence."
The panel ordered a federal district court judge in Maryland to dismiss the suit against Trump with prejudice, which would bar the plaintiffs from relaunching the case.
That judge had earlier denied Trump's bids to toss out the case, which led the president to appeal his decision to the 4th Circuit.
Trump quickly crowed about the 4th Circuit's decision on Twitter.
The president's lawyer, Jay Sekulow, called the ruling "a complete victory."
The attorneys general for Washington and Maryland issued a joint statement saying they believed the appellate judges "got it wrong."
"Although the court described a litany of ways in which this case is unique, it failed to acknowledge the most extraordinary circumstance of all: President Trump is brazenly profiting from the Office of the President in ways that no other President in history ever imagined and that the founders expressly sought—in the Constitution—to prohibit," said Maryland Attorney General Brian Frosh and District of Columbia Attorney General Karl Racine.
The two said they will "pursue our legal options," but did not name specific next steps.
They can ask the entire 4th Circuit to review the panel's ruling, or can escalate the matter to the Supreme Court, which has discretion over which cases it hears.
There is a good chance that they will ask the full court to review the decision, according to Carl Tobias, a professor of law at the University of Richmond Law School and an expert on federal judicial selection.
"I think a majority of the court is more moderate, or even liberal, compared to this panel, which is the most conservative panel you could draw of those 15 judges on this court," Tobias said. "I guess we will see something different out of the D.C. Circuit, but who knows."
The judges on the 4th Circuit panel that heard the case were Paul Niemeyer, who was appointed by President George H.W. Bush, Dennis Shedd, who was appointed by President George W. Bush, and Trump appointee A. Marvin Quattlebaum Jr.
Maryland and Washington alleged in their suit that the president's refusal to give up his interest in the Trump Organization's hotels and other properties enabled him to benefit from millions of dollars of spending by foreign and domestic government officials.
Specifically, they cited the president's majority interest in the Trump International Hotel in Washington and two Trump buildings in New York City, Trump Tower and Trump World Tower.
In February 2017, for instance, the plaintiffs said that the Embassy of Kuwait spent tens of thousands of dollars at the Washington hotel. That same month, the government of Saudi Arabia spent thousands of dollars on rooms and food, the plaintiffs said.
Washington and Maryland argued that those payments gave Trump's properties a competitive economic advantage over other, non-Trump-connected properties.
The appeals court did not accept those claims.
The three-judge panel noted the extraordinary nature of the case and the "difficult constitutional questions, for which there is no precedent."
In response to the claims about the president receiving an unfair economic advantage, the judges said that Washington and Maryland "have manifested substantial difficulty articulating how they are harmed by the President's alleged receipts of emoluments and the nature of the relief that could redress any harm so conceived."
Earlier this year, the Trump Organization said it had donated almost $200,000 to the U.S. Treasury to comply with its promise to turn over profits from foreign governments who patronized the company's businesses. That amount was nearly $50,000 more than the prior year.
The ruling Wednesday represents a significant legal victory for the president at a time when his administration is besieged by lawsuits.
And it comes one day after the federal appeals court for the 2nd Circuit, based in Manhattan, ruled that he cannot block critics from following him on Twitter.
The Justice Department, meanwhile, is still fighting to add a citizenship question to the 2020 census despite an adverse Supreme Court ruling last month.
A federal judge in New York on Tuesday temporarily barred the Justice Department from swapping out its legal team handling the case.
Trump has sought to turn the court battles into election fodder.
In a Twitter post Tuesday, the president wrote that the Supreme Court's decision on the census question "shows how incredibly important our upcoming 2020 Election is."
-- CNBC's Kevin Breuninger contributed to this report.
Read the appeals court decision here.