But the 5 to 4 decision sowed doubts about the job security and legal authority of high-level government officials in agencies as varied as the Nuclear Regulatory Commission, the Social Security Administration, the Consumer Product Safety Commission and the Federal Trade Commission.

In its ruling, the court gave people and businesses regulated by such agencies ammunition to file lawsuits challenging their power, lawyers and scholars said.

The target of the plaintiffs in Free Enterprise Fund v. Public Company Accounting Oversight Board was the nonprofit organization created in 2002 to oversee the firms that audit publicly traded companies. The plaintiffs argued that the board's setup violated the separation of powers by giving executive responsibilities to officials beyond presidential control.

The court said board members were too insulated from removal by the president. But, instead of throwing out the board or the entire Sarbanes-Oxley Act, as defenders of the law had feared, the court struck down only the part that said the Securities and Exchange Commission needs good cause to remove board members. The court said the SEC has the power to remove board members at will.

"The consequence is that the Board may continue to function as before, but its members may be removed at will by the Commission," Chief Justice John G. Roberts Jr. wrote for the majority. "With the tenure restrictions excised, the Act remains 'fully operative as a law,' " he wrote.

In a dissent, Justice Stephen G. Breyer said the opinion leaves in question the status of many government officials who are similarly insulated, including almost 1,600 administrative law judges.

"Reading the criteria above as stringently as possible, I still see no way to avoid sweeping hundreds, perhaps thousands of high level government officials within the scope of the Court's holding, putting their job security and their administrative actions and decisions constitutionally at risk," Breyer wrote.

Roberts countered that the majority opinion should not be read to cast doubt on the civil service system at independent agencies. He wrote that there was no reason for the court to address whether the positions Breyer identified pose constitutional problems.

Paul C. Light, a professor of public service at New York University, said the opinion "opens a Pandora's box of uncertainty" and will have a chilling effect on officials who are left to wonder if they are vulnerable.

Roger Pilon of the Cato Institute, who welcomed the affirmation of presidential power, said the opinion's implications are far-reaching but will become apparent only as lawsuits are filed.