Attorney General Jeff Sessions boards his plane at Andrews Air Force Base, Md., Thursday, July 27, 2017 At Andrews Air Force Base, Md. Sessions is traveling to El Salvador to meet with local leaders and discuss their efforts to fight gangs like MS-13. (AP Photo/Pablo Martinez Monsivais)

WASHINGTON (AP) — Warning of “holy hell” to pay if the president fires Attorney General Jeff Sessions, a top Senate Republican is working to prevent the potential end result, the dismissal of Special Counsel Robert Mueller.

Sen. Lindsey Graham of South Carolina is working on legislation that would block the firing of special counsels without judicial review. Democrats Sheldon Whitehouse of Rhode Island and Richard Blumenthal of Connecticut said Thursday they are among the senators on the Senate Judiciary Committee who are working with Graham on the effort.

Despite a drumbeat of criticism from President Donald Trump, congressional Republicans have expressed strong support for former FBI Director Mueller, who was appointed earlier this year to investigate allegations of Russian meddling in the U.S. election and possible links to the Trump campaign. They have also rallied around Sessions, a former senator from Alabama who has become a daily target of critical tweets from Trump.

Graham and Whitehouse lead the Judiciary panel’s subcommittee on crime and terrorism and have been investigating the Russian meddling along with the committee’s chairman, Iowa GOP Sen. Chuck Grassley. A Graham spokesman says the senator’s still working on the bill, and it’s unclear when it will be introduced.

Blumenthal said that the bill “might be a committee effort” and said that it would protect Mueller and other special counsels. He said firing Mueller “would precipitate a firestorm that would be unprecedented in proportions.”

Graham has sternly warned Trump not to fire Mueller or Sessions. He said Thursday, “If Jeff Sessions is fired, there will be holy hell to pay.”

Trump has criticized Sessions for recusing himself from the investigation into election meddling after he admitted to meeting with Russia’s ambassador during the campaign. Sessions, who traveled to El Salvador Thursday to work on an effort to lessen gang violence, has privately told allies he doesn’t plan to resign.