A federal judge in New York on Thursday threw out a lawsuit that had accused President Donald Trump of violating the U.S. Constitution by accepting foreign payments through his hotels and other businesses, handing him a major victory on an issue that has dogged him since even before he took office in January.

Though other lawsuits remain pending that make similar claims, the ruling by U.S. District Judge George Daniels is the first to weigh the merits of the U.S. Constitution's anti-corruption provisions as they apply to Trump, a wealthy businessman who as president regularly visits his own hotels, resorts and golf clubs.

In a 29-page opinion granting the Trump administration's request to toss the suit, Daniels said the plaintiffs did not have legal standing to bring the suit. The plaintiffs included the nonprofit watchdog group Citizens for Responsibility and Ethics in Washington (CREW), a hotel owner, a hotel events booker and a restaurant trade group.