The U.S. Supreme Court ordered the formal dismissal of two lawsuits that accused Donald Trump of unconstitutionally profiting from his presidency.

The cases no longer had any practical consequences after Trump’s term in office ended Jan. 20, and both sides agreed the disputes had become legally moot.

Those suing Trump included hotels, restaurants and the attorneys general of Maryland and the District of Columbia. They said Trump as president benefited from a stream of foreign and state government officials who patronized his properties, including the Trump International Hotel in Washington, a few blocks from the White House.

The lawsuits accused Trump of violating the Constitution’s two emoluments clauses. One clause bars a president from accepting benefits from foreign governments without congressional consent, while the other bars receipt of any benefit other than a salary from the U.S. government or a state.

“This important litigation made the American people aware for four years of the pervasive corruption that came from a president maintaining a global business and taking benefits and payments from foreign and domestic governments,” said Noah Bookbinder, executive director of Citizens for Responsibility and Ethics in Washington, a watchdog group involved in one of the suits.

A key question was who, if anyone, could sue to enforce the emoluments clauses. Lower courts in both cases said the plaintiffs had legal standing. The Supreme Court set aside those rulings as part of its order Monday, taking a step urged by Trump’s Justice Department.

Had the suits gone forward while Trump was president, the plaintiffs might have been able to force him to turn over some of his business records.

The cases are Trump v. Citizens for Responsibility and Ethics in Washington, 20-330, and Trump v. District of Columbia, 20-331.

This article was provided by Bloomberg News.