Washington — A federal judge on Wednesday rejected President Donald Trump’s latest effort to stop a lawsuit that alleges Trump is violating the Constitution by continuing to do business with foreign governments.

The ruling, from U.S. District Judge Peter J. Messitte in Greenbelt, Md., will allow the plaintiffs — the attorneys general of Maryland and the District of Columbia — to proceed with their case, which says Trump has violated little-used anti-corruption clauses in the Constitution known as the emoluments clauses.

This ruling appeared to mark the first time a federal judge had interpreted those Constitutional provisions and applied their restrictions to a sitting president.

If the ruling stands, it could bring unprecedented scrutiny onto Trump’s businesses — which have sought to keep their transactions with foreign states private, even as their owner sits in the Oval Office.

Messitte’s 52-page opinion said that, in the modern context, the Constitution’s ban on “emoluments” could apply to Trump — that it could cover any business transactions with foreign governments where Trump derived a “profit, gain or advantage.”

“This includes profits from private transactions, even those involving services given at fair market value,” Messitte wrote.

In the last year, the Trump Organization has hosted several large events paid for by foreign governments and reported about $150,000 in what it called “foreign profits” last year.

“In sum, Plaintiffs have plausibly alleged that the President has been receiving or is potentially able to receive ‘emoluments’ … in violation of the Constitution,” Messitte wrote.

Trump still owns his company, though he says he has stepped back from day-to-day control.

The Trump Organization and the Justice Department had both urged Messitte to dismiss the case, arguing the Founding Fathers had written this clause to stop officials from taking bribes — but not to stop them from doing business.

The company did not respond to requests for comment. The Justice Department released a short statement saying it was reviewing the decision: “We continue to maintain that this case should be dismissed.”

They could now seek to appeal the ruling.

The plaintiffs now want to interview Trump Organization employees and search company records to determine which foreign countries have spent money at Trump’s hotel in downtown Washington — and how much they spent. They also may seek to review Trump’s tax returns, which — unlike other recent presidents — he has not made public.

“We are one step closer to stopping President Trump from violating the Constitution’s original anti-corruption provisions,” said District of Columbia Attorney General Karl Racine, who brought this case along with Maryland Attorney General Brian Frosh.