A federal judge dismissed a lawsuit Thursday alleging that President Trump violated the Constitution’s emoluments clause because his hotels and restaurants do business with foreign governments while he is in office.

The plaintiffs argued that because Trump properties rent out hotel rooms and meeting spaces to other governments, the president was violating a constitutional provision that bans the acceptance of foreign emoluments, or gifts from foreign powers.

But Judge George Daniels of the Southern District of New York ruled that the plaintiffs, led by the government watchdog group Citizens for Responsibility and Ethics in Washington (CREW), lacked standing to bring such a case, saying it was up to Congress to prevent the president from accepting emoluments.

CREW said it plans to appeal the verdict.

The suit was one of the most high-profile efforts to take aim at Trump’s decision to hold onto his hotel and golf-course business while in the White House. However, the president faces similar suits: one filed by a group of congressional Democrats and another filed by the attorneys general of Maryland and the District of Columbia.

The group’s suit, filed three days after Trump’s inauguration, alleged that the president had violated a little-known, never-tested provision of the Constitution known as the foreign emoluments clause. Written to prevent early America’s officials from being swayed by gifts from wealthier nations, the provision bars officeholders from accepting a “present (or) emolument from any King, Prince or foreign state.”