A federal district judge has dismissed a lawsuit alleging that President Trump is violating two anti-corruption provisions of the Constitution.

Judge George Daniels, in Manhattan, said the plaintiffs lack the necessary legal standing to sue. And he said the heart of the plaintiffs' case — the Constitution's Foreign Emoluments Clause — was something they couldn't even sue over.

The Foreign Emoluments Clause bars federal officials from taking gifts or rewards from foreign governments, unless Congress consents.

Trump maintains that the two emoluments clauses — foreign and domestic — don't apply here, and he has never asked permission of Congress.

"No one would have thought when the Constitution was written that paying your hotel bill was an emolument," Sheri Dillon, one of Trump's lawyers, told reporters last January. "Instead, it would have been thought of as a value-for-value exchange. Not a gift, not a title, and not an emolument."

In his ruling, Daniels said Congress, not any citizen, has the power to act on the Foreign Emoluments Clause.

"Congress is not a potted plant," he wrote.

The watchdog group Citizens for Responsibility and Ethics in Washington sued Trump last January, on his first workday in the Oval Office. CREW is joined in the case by three other plaintiffs from the hospitality industry in Manhattan and Washington, D.C.

Deepak Gupta, representing the plaintiffs, said there will be an appeal. "We are not going to walk away from this serious and ongoing constitutional violation," he said. "The Constitution is explicit on these issues."

The Justice Department is defending the president. DOJ spokeswoman Lauren Ehrsam said last night the department "appreciates the court's ruling and its conclusion."

The emoluments clauses drew little public notice until Trump was elected. He is the first president to own a global business empire.

Critics say foreign governments and others seeking to influence him could funnel money through his hotels, restaurants and golf clubs. And the emoluments clauses are seen as important safeguards against corruption.

This case appears to be the first emoluments lawsuit ever in federal courts. Two others are pending.

The attorneys general of Maryland and the District of Columbia have a domestic-emoluments case. They claim their public facilities — such as convention centers — are losing business to Trump-owned enterprises in Washington, D.C. There's a preliminary hearing in that case next month.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.