WASHINGTON (Reuters) - The U.S. Supreme Court gave presidents more control over key jobs in federal agencies on Thursday, ruling that the way the Securities and Exchange Commission selected in-house judges who enforce investor protection laws violated the U.S. Constitution.

FILE PHOTO: The seal of the U.S. Securities and Exchange Commission hangs on the wall at SEC headquarters in Washington, DC, U.S., June 24, 2011. REUTERS/Jonathan Ernst/File Photo

The justices agreed with President Donald Trump’s administration that the SEC, in having low-level staff install administrative law judges, infringed upon powers given to the president in the U.S. Constitution’s “appointments clause” regarding the filling of certain federal posts.

The ruling could reverberate through the federal government, which has nearly 2,000 administrative law judges who decide matters as varied as unfair trade practices, veterans benefits and patent infringement.

The court’s 7-2 decision backed Raymond Lucia, a California-based former radio host and investment adviser who was banned by an SEC administrative law judge from investment-related work and fined $300,000 for making misleading claims in his “Buckets of Money” retirement wealth strategy.

The ruling marked a victory for the Republican president, who has sought to limit the power of certain federal agencies. Trump’s administration sided with Lucia, reversing the government’s previous stance supporting the SEC taken by the administration of his Democratic predecessor, Barack Obama.

The Justice Department said it was pleased with the decision.

The ruling, authored by liberal Justice Elena Kagan, could also make it easier for these in-house judges to be fired by a president’s political appointees in agencies rather than being protected from such action, as is currently the case.

The justices overturned a lower court ruling that had endorsed the SEC’s hiring practice for the judges. The agency’s commissioners, who are presidentially appointed, should have named them, not SEC staff, the justices said.

Six justices found the hiring process unconstitutional while Justice Stephen Breyer said it violated only federal administrative law. Justices Ruth Bader Ginsburg and Sonia Sotomayor dissented.

Lucia must now be given a new hearing in front of a properly appointed administrative judge, or the commission itself, the justices said.

‘CONSTITUTIONAL ACCOUNTABILITY’

“We are thrilled with the result, which is a victory for the rule of law, constitutional accountability and liberty,” Lucia’s attorney Mark Perry said.

An SEC spokesman said the agency is reviewing the decision.

The SEC had argued that its judges were merely employees in part because their decisions are not final and still subject to review by the commission.

It marked the latest case in which the Supreme Court limited the SEC’s powers. The justices last year scaled back the agency’s ability to recover ill-gotten profits from defendants’ misconduct, and on Monday accepted a case that could narrow the scope of defendants’ liability for securities fraud.

With Thursday’s decision, “the Supreme Court continues its growing streak of rebukes to the SEC,” said Nick Morgan, a lawyer at the firm Paul Hastings who previously worked in the agency’s enforcement division.

Kagan said administrative judges wield powers extensive enough to qualify under the Constitution as “inferior officers” subject to appointment by the president, a federal department head or a court. Just “as armies can often enforce their will through conventional weapons, so too can administrative judges,” Kagan said.

The SEC charged Lucia with securities fraud in 2012. SEC Administrative Law Judge Cameron Elliot found him liable, barring him from the industry and ordering him to pay $300,000 in fines.

Corporate rights groups had complained that as the SEC’s enforcement powers expanded, it sent more cases to its own judges rather than federal district courts, giving the agency an unfair “home court” advantage.

The ruling could affect dozens of cases pending before the SEC and other cases in federal appeals courts. Perry, Lucia’s lawyer, said there are about 150 administrative judges across 25 agencies who might fall under the officer designation.