The U.S. Supreme Court has ruled that the removal process for an oversight board created by the Sarbanes-Oxley Act violates the Constitution because its members are insulated from firing by the president.

The 5-4 opinion “reinvigorates separation of powers principles,” Bloomberg reports. Under the law, members of the Public Company Accounting Oversight Board are appointed by the Securities and Exchange Commission, and they are protected from removal by multiple layers, according to the majority opinion (PDF) by Chief Justice John G. Roberts Jr.

The law “not only protects board members from removal except for good cause, but withdraws from the president any decision on whether that good cause exists,” Roberts wrote. “That decision is vested instead in other tenured officers—the commissioners—none of whom is subject to the president’s direct control. The result is a board that is not accountable to the president, and a president who is not responsible for the board.”

Roberts envisioned a slippery slope if the present removal structure were allowed to stand. Congress could go on to create new boards insulated from presidential removal by adding even more layers of protection in “a Matryoshka doll of tenure protections,” he said.

The Sarbanes-Oxley Act was passed after the collapse of Enron to regulate accounting firms that audit public companies.

In announcing his majority opinion, Roberts expressly mentioned that the board can continue to function, SCOTUSblog says. The court severed the removal provision from the rest of the Sarbanes-Oxley law, even though Congress did not add a severability clause to make clear that if one part of the law is found constitutional, the rest may stand.

A statement issued by the Center for Audit Quality says the opinion will allow continued operation of the board. “This narrow decision clearly severs the PCAOB board member removal process from the rest of the Sarbanes-Oxley Act (SOX) and reaffirms all provisions of the law except for the power to remove the board members,” the statement says.

The case is Free Enterprise Fund v. Public Company Accounting Oversight Board.

Headline and lead changed at 1:30 p.m. to make clear the SOX board was not struck down in its entirety.