Two bipartisan pairs of senators unveiled legislation Thursday to prevent President Trump from firing special counsel Robert S. Mueller III without cause — or at least a reason good enough to convince a panel of federal judges.

Senators have raised concerns that the president might try to rearrange his administration to get rid of Mueller, who is spearheading a probe of Russia’s alleged interference in the 2016 presidential election and any possible collusion between the Kremlin and members of the Trump campaign and transition teams.

Mueller’s probe has been advancing, despite the president’s attempts to discredit the probe as an illegitimate “witch hunt.” He impaneled a grand jury in D.C. a few weeks ago, according to areport out Thursday. The case has already produced subpoenas, from a grand jury in the Eastern District of Virginia that issued them in relation to former national security adviser Michael Flynn’s business and former Trump campaign chairman Paul Manafort.

While Trump cannot fire Mueller directly, many have raised concerns in recent weeks that he might seek to replace Attorney General Jeff Sessions, who recused himself from all campaign-related matters, including the Russia probe. Sessions’s deputy, Rod J. Rosenstein, said he would not fire Mueller without cause — but a new attorney general could supersede his authority.

The blowback from Congress to Trump’s public criticism of Sessions was sharp and substantial, and his allies in the GOP told the president to back off. Senate Judiciary Committee Chairman Charles E. Grassley (R-Iowa) even indicated that he would not make time in the Senate schedule to consider a new attorney general nominee.

(Jenny Starrs/The Washington Post)

This week, there have been reports that new White House chief of staff John F. Kelly told Sessions he would not have to worry about losing his job.

But that has not quieted the concerns of the Democrats and Republicans behind the latest efforts to safeguard Mueller — and, by extension, his Russia probe — from presidential interference.

“The Mueller situation really gave rise to our thinking about how we can address this, address the current situation,” said Sen. Thom Tillis (R-N.C.), the co-author of one of the proposals. He called the effort “a great opportunity, in perpetuity, for us to be able to communicate to the American people that actions were appropriate — or if not, then not,” if an administration ever attempts to terminate a special counsel’s term.

The two proposals — one from Tillis and Sen. Christopher A. Coons (D-Del.) and the other from Sens. Lindsey O. Graham (R-S.C.) and Cory Booker (D-N.J.) — each seek to check the executive branch’s ability to fire a special counsel, by putting the question to a three-judge panel from the federal courts. They differ in when that panel gets to weigh in on the decision.

Graham and Booker’s proposal, which also has backing from Judiciary Committee Democrats Sheldon Whitehouse (R.I.) and Richard Blumenthal (Conn.), would require the judges panel to review any attorney general’s decision to fire a special counsel before that firing could take effect. Tillis and Coons’ proposal would let the firing proceed according to current regulations, which they codify in the bill — but the fired special counsel would have the right to contest the administration’s decision in court. In that scenario, the judges panel would have two weeks from the day the special counsel’s case is filed to complete their review and determine whether the termination was acceptable.

Tillis and Coons, who pulled their bill together over the past two days, explained the difference as one to ensure that the legislation does not run afoul of constitutional separation of powers. Both senators, as well as Graham, said they expect they may merge their efforts after lawmakers return to Washington in September.

“I think we maybe can have a meeting of the minds. I really appreciate them doing it,” Graham said Thursday of Tillis and Coons’s bill. “I just have a different way of doing it.”

In either guise, the bill effectively would limit the president’s authority to hire and fire special counsels — a privilege that fell more squarely under the executive’s purview after Congress let an independent-counsel law, established in the wake of the Watergate scandal, expire in 1999, following Kenneth Starr’s investigation of President Bill Clinton.

The lawmakers are not expecting that the president will like or support either proposal to protect the special counsel from being fired without cause. But they say they are convinced that there is enough support to pass such a law, even over Trump’s objections, because of the number of Republicans and Democrats speaking out in defense of Mueller and his probe.

Coons identified “a broader bipartisan concern that the president may take inappropriate action to interfere with the ongoing, important work of Bob Mueller,” he said, and guessed that “if the president were to fire the special counsel, the Senate might promptly take action to reappoint him.”

“This is the first step to put a speed bump in place against his improvident firing,” he said of his bill with Tillis.

Coons also pointed to his partnership with Tillis as an example of a trend “of public statements and actions by an increasingly wider range of bipartisan senators to push back on decisions by this White House.”

As far as Mueller is concerned, that may be smart politics.

According to a Quinnipiac University poll released this week, 64 percent of registered voters believe Mueller will conduct a fair investigation — far more than the 33 percent of registered voters who approve of the job Trump is doing as president. Sixty-nine percent of registered voters also believe it would be an abuse of power for Trump to order the Justice Department to fire the special counsel.

But the numbers are not so clear-cut when considering only registered Republicans. While more than half of registered GOP voters believe Mueller’s investigation will be fair, over three-quarters of registered Republicans approve of Trump’s tenure in the Oval Office. And only 37 percent of registered GOP voters believe that Trump would be abusing his power if he ordered Mueller’s firing.

Scott Clement contributed to this report.