FILE PHOTO: U.S. President Donald Trump holds coronavirus response meeting with governors at the White House in Washington

By Jan Wolfe and Jonathan Stempel

WASHINGTON (Reuters) - A U.S. appeals court on Thursday handed President Donald Trump a setback, rejecting his bid to end a lawsuit that accused him of violating anti-corruption provisions of the U.S. Constitution with his ownership of a hotel in Washington while in office.

The decision by the Richmond, Virginia-based 4th U.S. Circuit Court of Appeals sitting as a whole - reversing a ruling in favour of Trump last July by a three-judge panel of the same court - marked a victory for the Democratic attorneys general of Maryland and the District of Columbia who brought the lawsuit.

The lawsuit alleged violations of the Constitution's "emoluments" clauses - rarely tested in courts - that ban a president from accepting gifts or payments from foreign governments without congressional consent.

Judge Diana Gribbon Motz wrote on behalf of the court in the 9-6 decision that "in the United States, every person - even the President - has a duty to obey the law." The ruling stated that the Republican president - who is seeking re-election on Nov. 3 - failed to show the sort of "clear and indisputable right to relief" necessary for the case's early dismissal.

Trump's lawyer Jay Sekulow said he would appeal the ruling to the U.S. Supreme Court. Sekulow called the case "another example of presidential harassment" - the same term used by conservative Supreme Court justices on Tuesday when they expressed concern about subpoenas by Democratic lawmakers to obtain Trump's financial records.

If the ruling is not put on hold, Trump's businesses will now need to comply with dozens of subpoenas issued in the emoluments case, Maryland Attorney General Brian Frosh said in an interview.

The 4th Circuit questioned the narrow view of the emoluments clauses argued by Trump's lawyers in light of past statements by executive branch officials who served under previous presidents embracing a broader meaning.

"Given this history, we can hardly conclude that the President's preferred definition of this obscure word is clearly and indisputably the correct one," the ruling stated.

The case is now set to return to a federal judge in Maryland, who has consistently ruled against Trump on preliminary legal questions, for further proceedings.

Trump opened the Trump International Hotel on Pennsylvania Avenue just blocks from the White House shortly before he was elected in November 2016.

Trump, a wealthy real estate developer who as president regularly visits his own hotels, resorts and golf clubs, maintains ownership of his businesses - unlike past presidents - though he has said he has ceded day-to-day control to his sons. Critics have said that is not a sufficient safeguard.

The hotel has become a favoured lodging and event space for some foreign and state officials visiting the U.S. capital.

In a dissenting opinion, Judge J. Harvie Wilkinson said the decision would open the door for litigation meant to harass a sitting president.

"It is clear and indisputable that this action should never be in federal court," Wilkinson wrote. "The legal foundations for this lawsuit are non-existent."

Also dissenting, Judge Paul Niemeyer said Maryland and the District of Columbia lacked legal standing to sue.

Another appeals court in Washington in February dismissed a separate lawsuit by Democratic U.S. lawmakers also alleging violations of the emoluments clauses relating to the hotel. A different appeals court in New York has allowed a similar case brought by an advocacy group called Citizens for Responsibility and Ethics in Washington to continue.

(Reporting by Jan Wolfe in Washington and Jonathan Stempel in New York; Editing by Chizu Nomiyama and Howard Goller)