A major front in President Trump’s war on democratic norms has been his removal of officials who might obstruct his goals or check his power in some way: In the past few months alone, the list of ousted officials has included five inspectors general, the U.S. attorney for the Southern District of New York and a senior agency scientist working on covid-19 responses. Each firing chipped away at legal guardrails aimed at preserving the integrity of executive action. In the aggregate, they’ve left the president much more free to pursue self-serving, illegal and even (in the public health context) hazardous paths.

Yet with an odd sense of timing — or perhaps pitch-black irony? — the Supreme Court on Monday gave its blessing to a broad reading of the president’s constitutional power to remove officials even in the face of strong congressional efforts to limit such firings.

Monday’s decision concerned the Consumer Financial Protection Bureau, an independent agency with significant regulatory power over the banking and credit sectors — a project proposed and advanced ardently by Sen. Elizabeth Warren (D-Mass.). As designed by Congress, the CFPB is headed by a director who is nominated by the president and confirmed by the Senate, but who then can be removed by the president only if there is “inefficiency, neglect of duty, or malfeasance in office.”

The court ruled that it was unconstitutional for Congress to create an agency with a single leader who could not be removed at the president’s sole discretion — although members of the Securities and Exchange Commission and Federal Reserve boards enjoy such protection.

Set aside the court’s tenuous distinction between an agency headed by a single person and one with multiple leaders. A more immediate concern is that an unfettered presidential power to fire would undermine credible oversight by watchdog institutions within the executive branch. A hostile chief executive seeking to evade scrutiny of his dealings, or those of his allies inside and outside the administration, could use the removal power to ensure that misdeeds never become public — let alone punished.

And as Trump has demonstrated, worries about abuses of the presidential removal power are no abstract matter.

In this light, Monday’s decision could have broader, unfortunate implications. It could be read, for example, as undermining even the already-limited protections granted to inspectors general. Now, the president can typically fire them, but not before giving Congress 30 days’ notice and a written explanation. Yet President Trump has failed to follow even this modest limit. As Sen. Charles E. Grassley (R-Iowa) has pointed out, for example, Trump failed to supply adequate reasons for his removal of Michael Atkinson, the inspector general for the intelligence community. His motivation appears to have been revenge for Atkinson taking the Ukraine whistleblower’s complaint seriously.

The court’s decision might also be read to bar Congress categorically from insulating internal investigations into the president and his allies from White House interference. Under the Justice Department’s regulation, special counsels such as Robert S. Mueller III, for example, can only be fired personally by the attorney general — and then only “for cause.” It’s not hard to see this week’s decision being used to undermine that protection, too.

Despite the setback here, there still may be ways for Congress to insulate oversight-oriented officials from presidential whim or revenge. Such protections will be weaker than if the court had accepted the CFPB as it was. But they could still help. Taking advantage of these opportunities, though, means working with the rather formal and abstract logic of Monday’s decision.

That case was first filed by Seila Law, a California-based firm that, among other things, advised people on how to get relief from consumer debt. The CFPB began an investigation into whether Seila attorneys had violated the law by charging consumers illegal upfront fees for debt-relief services and lying about those fees. But the law firm challenged the CFPB’s power to investigate or impose sanctions on it, contending that the agency’s independence violated the constitutionally mandated separation of powers.

The court invalidated the statutory limit on presidential removal power over the CFPB’s director by a vote of 5 to 4. But it refused Seila’s request to shutter the agency, deciding instead to “sever” the removal provision — the problematic bit, in its view. That leaves current director Kathy Kraninger effectively an at-will employee of the president. No big deal — Kraninger was nominated by Trump in 2018 and shows no inclination to buck him.

The court’s decision was a mistake — at odds with historical evidence showing that the early Congresses did not believe the president to have an unlimited constitutional removal power. Even Alexander Hamilton, generally an advocate of wide executive authority, rejected the notion that “all [executive branch] offices are holden of the president.”

The majority also appealed to democratic principles to justify its decision. In the controlling opinion, Chief Justice John G. Roberts Jr. said that because the president is “the most Democratic and politically accountable official in Government,” he or she must be able to freely remove agency heads.

But no one seriously thinks that for a government to be democratic, all of its parts have to be under direct democratic control. (If so, why have independent federal courts?) What’s more, Roberts’s logic is plainly inapt when it comes to inspectors general and other executive branch officials whose very job is to inform Congress and the public whether the president and his allies are complying with the law. Democracy is not a game of “tag” in which you touch home base periodically via an election — but anything you do in the interim is fine. Absent oversight, the public may be denied the very information it needs to make a judgment about a president.

Read carefully, however, the court’s opinion leaves open paths for Congress to establish more robust insulation from improper pressure for watchdog offices such as inspectors general and special counsels, as well as essential agencies such as the Centers for Disease Control and Prevention.

Roberts’s majority decision, for example, explicitly anticipates the legality of some offices being insulated from presidential control. For example, Article II of the Constitution explicitly envisages some “inferior” officials being appointed by a federal court — rather than via White House nomination and Senate affirmation. On Monday, the court said that the presidential removal power doesn’t extend to these court-appointed offices as a matter of Article II.

An inferior officer, said Roberts, is one without “policymaking” or “significant administrative” duties. In the 1987 case of Morrison v. Olsen, the court previously placed the more powerful (but now defunct) independent counsel office within that box, and didn’t disturb that ruling Monday. More modestly, it seems reasonable to think that a special counsel (such as Mueller) with limited investigative power could still be given a measure of tenure protection, consistent with the court’s ruling in Seila Law v. Consumer Financial Protection Bureau.

Inspectors general almost certainly merit the “inferior officer” label as well. Insulating these offices from presidential control would mean creating a new legislative scheme in which inspectors general are not Senate-appointed, as most are now. Rather, under a new law, they would have to be freshly appointed by federal judges and then by statute insulated from presidential removal. Right now, these officials are vulnerable. Making this legislative change would protect them — and hence advance democracy, under any understanding of that term. These officials’ core task, after all, is to ensure that citizens do not have to rely on news media statements and tweets to evaluate what the president is doing: They supply voters with reliable and fact-based grounds for electoral judgment.

Of course, this is a second-best solution for the risk of presidential interference. Monday’s decision remains a setback for advocates of an accountable presidency. But the blow need not be fatal. And taking up the path outlined here would strengthen our democracy — a goal that even the court’s majority purports to share.