Donald Trump took a rare judicial victory lap on Wednesday after a three-judge panel tossed out a Democrat-led lawsuit accusing him of corruption by accepting foreign government business at his Washington, D.C. hotel.

The U.S. Constitution makes such dealings impermissible, although the Trump Organization writes am annual check to the Treasury to offload its profits from all such transactions it can identify.

'Word just out that I won a big part of the Deep State and Democrat induced Witch Hunt,' Trump tweeted after the ruling was made public.

'Unanimous decision in my favor from The United States Court of Appeals For The Fourth Circuit on the ridiculous Emoluments Case. I don’t make money, but lose a fortune for the honor of serving and doing a great job as your President (including accepting Zero salary!).'

President Donald Trump won a court victory on Wednesday when a federal appeals panel tossed a lawsuit that accused him of unconstitutionally accepting profits from foreign governments

Trump called the lawsuit a product of the 'Deep State' on Wednesday

All three of the judges who heard Trump's appeal of a lower court ruling were appointed by Republican presidents. A separate case proceeding along similar lines is still alive in the District of Columbia.

The Richmond, Virginia-based 4th Circuit Court of Appeals instructed Maryland-based U.S. District Judge Peter Messitte to dismiss the lawsuit filed in June 2017 by the Democratic attorneys general of Maryland and the District of Columbia.

The attorneys general lacked legal standing to sue, the appeals judges decided. Messitte had allowed the case to proceed, spurring Trump's appeal.

'Today's pair of decisions by the 4th Circuit Court of Appeals is a complete victory,' Trump lawyer Jay Sekulow said in a statement. 'This latest effort at presidential harassment has been dismissed with prejudice.'

'The decision states that there was no legal standing to bring this lawsuit in the first place,' he added.

Trump opened the Trump International Hotel, just blocks from the White House, shortly before he was elected in November 2016. Unlike past presidents, he has retained ownership of numerous business interests, including the hotel, while serving as president.

Since his election, the hotel has become a favored lodging and event space for some foreign and state officials visiting the U.S. capital.

President Trump is still accused in one other lawsuit, brought by Demorcats in Congress, of illegally profiting off the presidency by retaining ownership of his eponymous hotel in Washington, D.C.

The lawsuit alleged that because he hasn't walked away from his ownership in the hotel, Trump made himself vulnerable to lures and come-ons from foreign governments seeking to curry favor.

The Constitution's 'Emoluments Clause,' dating from the Revolutionary War era, prohibits the president and other government officials from accepting foreign gifts and money without permission from Congress.

The remaining lawsuit was brought by nearly 200 congressional Democrats led by Sen. Richard Blumenthal of Connecticut and Rep. Jerrold Nadler of New York, who is also chair of the House Judiciary Committee.

Justice Department lawyers asked the U.S. Court of Appeals for the District of Columbia Circuit this week to overrule a federal judge and instead allow for a mid-case appeal or to dismiss the case outright, calling the case 'extraordinary.'

The government lawyers also want the court to suspend legal discovery recently approved by U.S. District Judge Emmet Sullivan, which would force Trump-related entities such as his New York and D.C. hotels, Trump Tower, the Trump Organization, and Mar-a-Lago Club to turn over business tax returns, receipts and other documents.

DOJ lawyers said in court filings that answering their 37 subpoena requests in the interim, by a July 29 deadline, would cause Trump 'irreparable injury' and distract him from his official duties.