Top Senate legislators are moving to protect former FBI Director Robert Mueller’s investigation into Russian election interference in case President Donald Trump tries to derail it.

On Thursday, Sens. Thom Tillis (R-NC) and Chris Coons (D-DE), two members of the Senate Judiciary Committee, announced they would introduce a bill to allow Justice Department special counsels, like Mueller, to challenge their removals in court. A three-panel judge would then get to adjudicate the challenge — meaning Trump could be overruled should he try to fire the special counsel.

The decision is a preemptive attempt to curtail the president, who has publicly criticized Mueller and derided the Russia investigation. In an interview with the New York Times, Trump even flirted with the idea that he’d fire Mueller if the former FBI director’s investigation winds up looking at Trump’s finances.

"It is critical that special counsels have the independence and resources they need to lead investigations," Tillis said in a statement. "A back-end judicial review process to prevent unmerited removals of special counsels not only helps to ensure their investigatory independence, but also reaffirms our nation's system of check and balances."

If passed, the bill could provide a key safeguard for Mueller. But it’s also a sign of congressional Republicans’ growing willingness to distance themselves from the president. Trump has spent the past few weeks berating Senate Republicans, attacking his ostensible political allies for failing to pass a health care bill and for passing a Russia sanctions bill that limits his executive authority on foreign affairs. As Sean Sullivan recently wrote for the Washington Post, Senate Republicans aren’t exactly thrilled by being constantly attacked by the sitting president — and may be willing to retaliate in kind.

Sullivan writes: