In a blow to President Trump, the full 4th Circuit Court of Appeals will rehear an emoluments case that he won over the summer.

A three-judge panel dismissed the case the case in July, ruling that attorneys general for Maryland and D.C. lacked the right to sue to enforce the Emoluments Clause.

The earlier ruling came after government attorneys representing the President filed an emergency appeal, preventing the case from reaching discovery while still at the district court level. The three-judge panel was comprised of Republican-appointed judges, including one appointed by Trump.

Oral arguments for the rehearing en banc are scheduled for Dec. 12.

The state attorneys general sued Trump in June 2017, seeking an injunction that would stop what they refer to as the President’s “unprecedented constitutional violations.” The lawsuit focuses on Trump’s decision to continue owning his companies after taking office, alleging that his ownership of the D.C. hotel in particular unfairly draws business away from taxpayer-subsidized facilities in D.C. and Maryland.

The attorneys general also seek to inspect key financial records of Trump’s – including his tax returns – as part of the lawsuit, in a bid to determine the extent to which he receives foreign government income.

The Richmond federal appeals court ruled that the attorneys’ general interest in the case was too “attenuated” to be enforceable in an opinion that addressed some questions about the viability of bringing a claim under the Emoluments clause.

The appeals court accused the district-level judge of acting on a “whim,” and argued that “even if government officials were patronizing the Hotel to curry the President’s favor, there is no reason to conclude that they would cease doing so were the President enjoined from receiving income from the Hotel.”

The President has been sued in two other instances over alleged Emoluments Clause violations. One case — brought by members of Congress in D.C. federal court — is currently on appeal. Another case filed by competitors of Trump’s businesses was initially dismissed at the district court level, and then upheld last month by a Manhattan federal appeals court.

Read the order here: