A federal judge denied on Wednesday a motion to dismiss a lawsuit accusing President Donald Trump of receiving improper payments from states and foreign governments — or emoluments — through his Washington hotel in violation of the U.S. Constitution.

According to court documents, U.S. District Judge Peter J. Messitte ruled that the plaintiffs, the state of Maryland and the District of Columbia, had legal standing to challenge Trump's involvement with his eponymous company, but narrowed the scope of the suit to the Trump Organization’s business in the District of Columbia. The judge denied the plaintiff's effort to include properties like the president's private Florida club, Mar-a-Lago, in the suit.

The president has been criticized for continuing to retain ownership interest in the Trump Organization, which opened the luxury Trump International Hotel just blocks from the White House during the 2016 presidential campaign. It has proven popular with administration staffers and foreign dignitaries alike.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Constitution bars public officeholders from accepting payments or titles from foreign governments without approval from Congress, a clause designed to prevent officials from being corrupted.

If it withstands likely appeals, the suit could allow prosecutors — two Democratic attorneys general, Maryland's Brian Frosh and D.C.'s Karl Racine — to seek documents from the Trump Organization on how much money is sent there by states and foreign governments, something that is not publicly known.

Frosh and Racine argue in the suit that the president's hotel and event spaces have an unfair advantage over their own convention centers because of its ties to the president, a harm the president's Department of Justice attorneys have said is speculative.

The president said he'd turn control of his company over to his sons after winning the presidency, but refused to divest from it. The Trump Organization said it would donate all profits "from foreign governments' patronage at our hotels and similar businesses" during Trump's presidency to the U.S. Treasury, butthey've declined to detail the amount.

This is not the first suit to target the president's business ties, and at least two have already been dismissed in courts.

If this suit progresses, it is sure to bring some history into the courtroom, since the plaintiffs are pointing to 230-year-old decision as part of their legal argument. According to the opinion released Wednesday, Maryland argued that the anti-corruption Emoluments Clauses in the Constitution were key "to its decision to enter the Union and that it retains the power to enforce those provisions today."