(Reuters) - A federal judge on Wednesday rejected President Donald Trump’s bid to dismiss a lawsuit accusing him of unconstitutionally accepting gifts from foreign and state governments through his Washington hotel while occupying the White House.

U.S. District Judge Peter Messitte’s decision clears the way for the attorneys general of Maryland and the District of Columbia, who brought the case, to pursue interviews with Trump Organization employees and review financial records to learn if the president broke the law.

The lawsuit accused Trump of violating the Constitution’s “emoluments” clauses, which bar federal officials from accepting gifts from foreign governments without congressional approval, and the president from receiving gifts from states. They are designed to thwart corruption and improper influence.

“It’s an historic decision,” Maryland Attorney General Brian Frosh said in an interview. “There has never been another president who has tested the emoluments clause. This is the first time we have had a president who has walked up to and, in our view, walked way over the line.”

Messitte had in March narrowed the lawsuit to focus on profits stemming from Trump’s ownership, through the Trump Organization, of the Trump International Hotel, a popular spot for foreign officials near the White House.

But in Wednesday’s 52-page decision, the Greenbelt, Maryland-based judge rejected Trump’s “cramped” view that emoluments were limited essentially to bribes.

Messitte said the plaintiffs had “convincingly argued” that emoluments had a broader meaning, consistent with how even George Washington used the term in a 1776 proclamation.

“The clear weight of the evidence shows that an ‘emolument’ was commonly understood by the founding generation to encompass any ‘profit,’ ‘gain,’ or ‘advantage,’” Messitte wrote.

He also said emoluments include “profits from private transactions, even those involving services given at fair market value.”

The U.S. Department of Justice, which defended Trump, is determining its next steps “to continue vigorously defending the President,” spokesman Andy Reuss said in an email. “We continue to maintain that this case should be dismissed.”

Karl Racine, the D.C. attorney general, countered in a statement: “325 million Americans shouldn’t have to wonder if the president is putting his personal financial interests ahead of the national interest.”

A Manhattan federal judge had in December dismissed a similar lawsuit by plaintiffs including the watchdog Citizens for Responsibility and Ethics in Washington, saying they lacked standing to sue.

Roughly 200 House and Senate Democrats filed their own lawsuit in June 2017, demanding that Trump obtain Congressional approval before accepting emoluments. That case is pending.

The case is District of Columbia et al v Trump, U.S. District Court, District of Maryland, No. 17-01596.