Washington: A federal judge on Wednesday rejected US 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.

US 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 Organisation employees and review financial records to learn if the President broke the law.

US President Donald Trump has lost his bid to dismiss an emoluments lawsuit. Credit:Bloomberg

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."