A federal judge unexpectedly declined to dismiss a lawsuit Wednesday that argues President Donald Trump’s continued stake in the Trump Organization is unconstitutional. The litigation, which accuses Trump of violating a constitutional prohibition on accepting certain gifts or payments, can go forward.

Maryland and Washington, DC, have sued Trump over the Constitution’s “emoluments” clause, which forbids federal officials from accepting emoluments, a term for gifts or payments for services or labor from foreign governments or US states. (There’s some debate among scholars about what actually constitutes an “emolument,” which is relevant to the suit.)

The suit argued that Trump is violating the Constitution because his businesses, including his DC hotel, are making money all over the world and receiving payments from foreign governments and their representatives as well as state and federal officials.

The lawsuit seemed like a long shot when it was filed last June. The biggest question was whether the states could show that they had “standing” in the case — that is, that they had suffered injury that would give them grounds to sue. If a judge found they did not, the lawsuit would be over before it really began.

But on Wednesday, US District Judge Peter Messitte, who was appointed by President Bill Clinton, ruled that the states did have standing and the lawsuit could continue:

Plaintiffs have sufficiently alleged that the President is violating the Foreign and Domestic Emoluments Clauses of the Constitution by reason of his involvement with and receipt of benefits from the Trump International Hotel and its appurtenances in Washington, D.C. as well as the operations of the Trump Organization with respect to the same. Plaintiffs have demonstrated their standing to challenge those purported violations because they have shown injury-in-fact, fairly traceable to the President’s acts, and that the injury is likely redressable by the Court.

The thrust of Messitte’s decision is that the states successfully showed they have been injured by the advantages that Trump’s businesses — most importantly, his DC hotel — gained over the states and their interests (like other hotels that receive taxpayer money) through his continued business stake in the Trump Organization while he serves as president of the United States.

For example, as the Washington Post noted, the Trump hotel might be receiving business that would otherwise have gone to the Washington Convention Center or a hotel in Maryland, both of which are subsidized by their state governments.

Messitte did make an important distinction, however: He said the states had standing to sue over the emoluments clause as it relates to the Trump Organization’s DC hotel but not as it relates to other properties, like Mar-a-Lago in Florida or Trump’s many ventures in other nations.

The scope of the case is therefore is limited to the DC area and Trump’s business interests there because that is the place where Maryland and the DC government could show they had suffered an injury.

Nevertheless, the ruling is a substantial win for the states, whose ability to sue had been in serious doubt. It will allow the lawsuit to go forward and could lead to more discovery that could force uncomfortable disclosures by Trump and his company.

The emoluments clause and lawsuit, explained in brief

As president, Trump is not subject to the same conflict of interest rules as other federal officials. He is, however, still bound by the Constitution.

So far, the president has refused to totally disconnect himself from the Trump Organization. He ostensibly put his holdings into a blind trust overseen by his children, but most ethics experts dismiss that act as meaningless.

Blind trusts are usually run by independent figures, and Trump is clearly in regular contact with his children. More broadly, because the Trump Organization carries Trump’s name, it’s still a signal to would-be customers that the money they’re spending could end up in the president’s pocket.

Jeff Stein and Libby Nelson explained the emoluments issue in much more detail for Vox. You should read their explainer in full, but here is the big takeaway:

There isn’t total agreement among scholars on the question of whether Donald Trump would be violating the Constitution by allowing foreign governments (and companies backed by foreign governments) to do business with his private company. But top ethics experts from both the Bush and Obama administrations have argued fervently that he is. At issue is the meaning of the emolument clause of the Constitution in Article I, Section 9. An “emolument” refers to compensation for a service or labor, which raises the question of whether foreign payments to Trump-owned businesses constitute forbidden emoluments. On its own, scholars say, simply having his businesses continue to interact abroad may not necessarily mean Trump is running afoul of the Constitution. One issue is that no American president has ever had anything close to resembling Trump’s international business ties.

Violations of the emoluments clauses are a difficult case to prove because there is little precedent, the definitions are poorly understood, and it is not easy to prove that anybody has been wronged by any alleged violations.

At the least, Maryland and DC have now cleared one of those hurdles.