A federal appeals court has ordered the dismissal of a lawsuit alleging President Trump violated the Constitution’s Emoluments Clause through his continued financial interest in his Washington, D.C., hotel.

The ruling from the unanimous three-judge panel of the 4th U.S. Circuit Court of Appeals is a victory for the president, who was accused by the attorneys general of D.C. and Maryland of unconstitutionally profiting from foreign governments whose officials stay at or frequent the Trump International Hotel, located just blocks from the White House.

The court ruled the District of Columbia and Maryland lack the legal standing to bring the lawsuit and sent the case back to the district court in Maryland with instructions to dismiss the complaint.

“The District and Maryland’s interest in enforcing the Emoluments Clauses is so attenuated and abstract that their prosecution of this case readily provokes the question of whether this action against the president is an appropriate use of the courts, which were created to resolve real cases and controversies between the parties,” Judge Paul Niemeyer wrote for the court.

D.C. Attorney General Karl Racine and Maryland Attorney General Brian Frosh, both Democrats, argued in their lawsuit that Trump violated the Constitution’s emoluments clause through his continued financial interest in his luxury hotel. The emoluments cause bars presidents from accepting gifts or money from foreign governments unless they receive congressional approval.

The lawsuit from the pair of attorneys general is one of many the president is facing related to his business dealings, and congressional Democrats have issued a string of subpoenas for financial records related to his real estate empire. But the president has sought to block the release of business information and vowed to fight "all the subpoenas."

Trump celebrated the victory from the 4th Circuit in a pair of tweets denouncing the lawsuit against him as a “Deep State and Democrat induced Witch Hunt.”

“I don’t make money, but lose a fortune for the honor of serving and doing a great job as your President (including accepting Zero salary!),” the president tweeted.

....serving and doing a great job as your President (including accepting Zero salary!). — Donald J. Trump (@realDonaldTrump) July 10, 2019

But Racine and Frosh said the notion that neither D.C. nor Maryland were harmed by Trump's alleged violation of the Constitution is "plain error" and vowed to continue pursuing legal options.

"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," they said in a joint statement. "We have not and will not abandon our efforts to hold President Trump accountable for violating the Nation’s original anti-corruption laws."