Washington (CNN) A federal judge said Wednesday that a lawsuit alleging gifts or payments from foreign and domestic governments made to President Donald Trump may be illegal can proceed.

But the ruling from Judge Peter Messitte of the US District Court of Maryland says the Maryland and District of Columbia attorneys general who brought the case will have to focus it on the Trump Organization's operations in Washington. That means the case going forward will challenge payments made by foreign officials for services at the Trump International Hotel, but will not include visits to Mar-a-Lago in Florida or other Trump properties.

Maryland and DC have argued that the Trump International Hotel's operations put other nearby hotel and entertainment properties at a competitive disadvantage, and that the Trump hotel got special tax concessions.

Messitte did not make any rulings on the allegations in the case, which accuse Trump of taking illegal gifts from foreign governments through his family's business, violating the Constitution's Emoluments Clause.

Still, the judge hints at his feelings toward the Trump International Hotel. He notes multiple times, for instance, that foreign governments have moved business from the Four Seasons and Ritz Carlton hotels in Washington to the "President's Hotel."

Read More