WASHINGTON — A federal appeals court Friday breathed new life into a lawsuit claiming that President Donald Trump's profiting from restaurants and hotels patronized by government officials violates the Constitution.

In late 2017, a judge threw the case out, concluding that the groups behind the lawsuit did not have a legal right to bring the challenge over a violation of the Constitution's emoluments clause, which forbids a president to receive financial benefits from foreign or domestic governments.

But by a 2-1 vote, a panel of the Second Circuit Court of Appeals in New York said the judge was wrong to dismiss the case and sent it back with instructions to continue with the lawsuit. It was brought by a group of restaurant and hotel owners who say that both foreign and state government officials patronize Trump hotels and restaurants to curry favor from the president, putting them at a competitive disadvantage and hurting their businesses.

"The president's establishments offer government patrons something that the plaintiffs cannot: the opportunity, by enriching the president, to obtain favorable governmental treatment from the president and the executive branch," the appeals court said.

In dissent, Judge John Walker said the courts have never clearly defined the Constitution's emoluments clauses. He called the lawsuit deeply political. "President Trump was democratically elected by the American people — and he was elected with his business holdings and brand prominence in full view."

A group called Citizens for Responsibility and Ethics in Washington, which originally filed the lawsuit, applauded Friday's ruling. "We never wanted to be in a position where it would be necessary to go to court to compel the president of the United States to follow the Constitution," the group said in a statement. "However, President Trump left us no choice, and we will proudly fight as long as needed to ensure Americans are represented by an ethical government under the rule of law."

The ruling runs counter to a decision by the Fourth Circuit Court of Appeals, which tossed out a similar lawsuit in July brought by the attorneys general of Washington, D.C., and Maryland on behalf of businesses that compete with the Trump International Hotel in Washington. That ruling said there was no clear proof that Trump's ownership of the luxury hotel — situated five blocks from the White House — was creating competition with local convention centers. And the Fourth Circuit said that the local governments couldn't show how any such competition, if it existed, could be legally prevented.

But Friday's decision took a different view, saying courts are not powerless and "could require public disclosure of the president's private business dealings with government officials through the Trump establishments, which may discourage presidential action that appears to improperly reward such patronage."

Another emoluments clause challenge has been brought by members of Congress, claiming that the president's acceptance of foreign emoluments without congressional approval violates the Constitution.