A federal appeals court has revived a lawsuit brought by Maryland and the District of Columbia that challenges President Donald Trump's ownership of a luxury hotel five blocks from the White House.

A three-judge panel of the 4th Circuit Court of Appeals ordered the case dismissed in July. But the full appeals court agreed late Tuesday to rehear the case, which has the effect of wiping out the panel's ruling and giving Maryland and D.C. another chance to argue their case, claiming that Trump's holdings present a conflict between his business profits and the nation's interest.

D.C. Attorney General Karl Racine and Maryland Attorney General Brian Frosh praised the appeals court's action, saying, "We look forward to arguing our case before the full panel to stop President Trump from violating the Constitution and profiting from the presidency.”

They claim that Trump's hotel ownership violates the Constitution's emolument's clauses, which bar the president from receiving "any present, emolument, office or title of any kind whatever from any king, prince or foreign state" or any state in the U.S. Their lawsuit, filed in 2017, said he improperly benefits financially whenever foreign or state governments patronize the Trump Hotel on Pennsylvania Avenue.

The suit said the hotel was unfairly competing with D.C.'s convention center and Maryland's National Harbor development, both of which earn local tax revenue and help area businesses.

The appeals court panel called the case weak and said it failed to show that Trump's ownership of the hotel has actually competed with local convention centers. And it said the local governments couldn't show how any such competition, if it existed, could be legally prevented.

The full appeals court will hear the case Dec. 12 in Richmond, Virginia.

In September, the 2nd Circuit Court of Appeals revived a separate emoluments lawsuit against Trump, which claims he unconstitutionally profits from restaurants and hotels patronized by government officials. And the president faces a third emoluments lawsuit, filed by congressional Democrats.