Sens. Thom Tillis (R-NC) and Chris Coons (D-DE) plan to introduce legislation meant to shield Department of Justice special counsels from political influence — with an eye toward protecting Robert Mueller, the special counsel at the head of the department’s Russian election meddling investigation and a target of the Trump administration.

The Associated Press reported Wednesday that Tillis and Coons’ legislation would allow any Justice Department special counsel to challenge his or her firing in court, and to have it reviewed by a three-judge panel. The bill would apply retroactively to May 17, 2017, AP reported — the day Mueller was assigned as a special counsel by Deputy Attorney General Rod Rosenstein.

Mueller has the support of a broad, bipartisan swath of Congress, who largely saw his appointment as an opportunity to turn the legislature’s attention back to policy priorities.

President Donald Trump, meanwhile, has reportedly raged at Mueller’s investigation. Political allies like former House Speaker Newt Gingrich, and Trump himself, have attacked Mueller for his working friendship with ousted FBI Director James Comey, and for the investigators working under him who have donated to the campaigns of Hillary Clinton and other Democrats.

In an interview with the New York Times in July, Trump agreed that Mueller would be crossing a line if he, in words of a Times reporter, “was looking at your finances and your family finances, unrelated to Russia.”

Tillis and Coons both characterized the legislation as an important safeguard against executive overreach.

“It is critical that special counsels have the independence and resources they need to lead investigations,” Tillis told AP. “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.”

Coons added: “Ensuring that the special counsel cannot be removed improperly is critical to the integrity of his investigation.”

The bill is similar to one championed by Sens. Lindsay Graham (R-SC) and Cory Booker (D-NJ) that would require judicial approval before a special counsel is fired.

This post has been updated.