There are signs the political system is creakily moving into gear to protect the investigation of Russia’s interference in the 2016 election. Will the moves be fast enough? The integrity of our democracy might depend on the answer.

Congress could act to protect special counsel Robert Muller and make it far harder for a panicked president to fire him. Mueller, too, appears to be taking steps to protect the investigation even if Trump swings the axe. Justice Department leadership could find ways to block or at least delay his firing. Ultimately, though, only a howl of public outrage would be enough to protect the investigation.

Plainly, President Trump is one explosive tweet away from triggering a constitutional crisis. The president used the somber occasion of a meeting with military leaders to discuss a possible attack on Syria to call the FBI raid on Michael Cohen’s home and office an “attack on our country.” “Many people,” he said, have urged him to fire Mueller. Trump actually gave the order once already, in June of last year, only to be blocked when his White House counsel refused to carry it out and threatened to quit. The New York Times reports Trump tried again in December. The president seems constrained only by his staff’s lack of eagerness to conspire to obstruct justice.

The risks seem to be escalating, with the capital rife with rumors that Trump will fire Rod Rosenstein, the deputy attorney general who supervises the independent counsel. If Trump manages to replace him with a pliant apparatchik, it will be that much easier to act.

Lawmakers appear at last to be taking seriously this threat to the rule of law. On Wednesday, Republican Sens. Lindsey Graham and Thom Tillis joined with Democrats Cory Booker and Chris Coons to propose a new measure to protect Mueller (previously they had dueling plans). It would delay any firing of the special counsel for ten days. Mueller could appeal to a three-judge panel for reinstatement during that time. Senate Judiciary Committee chair Charles Grassley announced he would add the bill to the panel’s calendar. A vote will likely come this month.

Grassley’s move marks a significant break with the White House, one of the most important yet by any Republican lawmaker. It would likely pass the committee, and if it came to the Senate floor, it may initially garner majority support. But timing matters. The Senate is built to move … slowly. Any filibuster would require 60 votes to break. Senate Majority Leader Mitch McConnell—last seen flashing a thumbs-up with the president in a meeting at the White House—has said he did not see the need for such a step. Still, it would be an ugly spectacle. Senators would debate, and be forced to vote, in the glare of public attention.

Even with Senate support, the bill would be far from becoming law.

There’s the House of Representatives, of course. House leaders usually have an iron grip on what measures come to the floor. Speaker Paul Ryan has murmured support for Mueller, but said he saw no need for a law. Will the lame duck speaker show sudden independence? Far more likely, the feral competition to succeed him will push party leaders to outdo each other in backing Trump. Democrats could try to force a vote with a “discharge petition,” requiring signatures from a majority of House members. Those hardly ever succeed, but would put vulnerable Republicans on the spot, further imperiling the party’s majority.

The president would surely veto such a measure. Congress could override the veto, but that would take a two-thirds majority in both houses. Since 1952, a Congress controlled by the president’s party has overridden a veto only twice, both times under Jimmy Carter.

After all that, a new law would likely face a court test, though probably only if it were triggered by a firing. In the past, the Supreme Court found the previous independent counsel statute, now expired, to be constitutional. Two of three law professors who testified before the Senate in September said the plan would pass muster. But Antonin Scalia’s famous dissent in Morrison v. Olson, warning of the dangers of independent prosecutors gone rogue, has earned growing support among judges.

And the whole process could be short-circuited if Mueller gets fired first. What then? Mueller appears to be preparing for such an outcome, taking pains to share the job of investigating with as wide a group of prosecutors as possible. Court filings show that Rosenstein has approved steps including the indictment of former Trump campaign chair Paul Manafort. The raid on Michael Cohen’s office happened after Mueller referred the matter to his supervisor, who sent it to the famously independent U.S. attorney for the Southern District of New York in Manhattan. There’s reason to believe that underlying evidence is being shared within the Justice Department as well.

Alan Dershowitz, the former Harvard Law professor who defends Trump on television and recently dined with him, went on Sean Hannity’s Fox show and attacked Mueller for “laundering information to another prosecutorial authority” and called the steps “subterfuge.” That may be the first time a prosecutor was attacked for not going rogue.

Compare Mueller’s deft and appropriate conduct with that of a notorious predecessor. Kenneth Starr brought no charges against President Bill Clinton when he was tasked with investigating the Whitewater real estate deal. But he wrongly grabbed at the chance to expand his own jurisdiction to investigate Clinton’s personal scandal. A year of crisis followed, with impeachment by the House, acquittal by the Senate, and Clinton’s approval rating soaring.

If Trump orders Rosenstein and Sessions to fire Mueller, they could greatly complicate his plans by refusing. Trump could fire them, but that might then block his ability to slip another official into place who would do the job. Legal experts disagree about what would happen next. Other Justice Department officials could balk as well. Trump could find himself with nobody in “Main Justice” willing to do the deed.

The one thing that would make the biggest difference is public outrage. Richard Nixon thought he could get away with the Saturday Night Massacre until tens of thousands of telegrams helped force him to appoint a new prosecutor and release his damning tapes. Will Americans flood the streets to protest if the president finds a way to fire Mueller? The president’s view of himself is refracted through the press. And nonstop coverage of demonstrators in the street may be just what is needed to weaken his resolve and force him to reconsider his own self-sabotage.

Michael Waldman is president of the Brennan Center for Justice at NYU School of Law. He is the author of The Fight to Vote (Simon & Schuster).