Senate Republicans are rallying to protect special counsel Robert Mueller.

Legislation to prevent Trump from firing Mueller is gaining momentum on Capitol Hill and Republican senators are warning Trump against trying to fire Mueller through heated comments on TV. One conservative group ran a TV ad defending Mueller on two shows Trump is known to regularly watch: MSNBC’s “Morning Joe” and Fox News’ “Fox and Friends.”

The Senate effort comes as Trump increases his criticism of Mueller as the Russia probe heats up. In response to an FBI raid on his personal lawyer Michael Cohen on Monday, Trump lobbed a threat, saying, "Why don't I just fire Mueller?” in response to a reporter's question.

White House Press Secretary Sarah Sanders confirmed that threat is real on Tuesday when she said Trump “believes he has the power” to fire the special counsel. (He doesn’t.) Trump escalated the threat further Wednesday morning by calling Mueller the “most conflicted of all” on Twitter.

Trump considered trying to fire Mueller as recently as December, according to a report from the New York Times this week.

In an act of bipartisan unity to defend Mueller, four senators merged their Mueller protection bills on Wednesday to create the “Special Counsel Independence and Integrity Act,” which would allow only a senior Justice Department official to fire the special counsel and would require the reason in writing. The bill also gives the special counsel the right to request judicial review of his firing.

The senators behind the bill are Republicans Lindsey Graham of South Carolina and Thom Tillis of North Carolina, and Democrats Corey Booker of New Jersey and Chris Coons of Delaware.

The Senate Judiciary Committee, led by Republican Chuck Grassley of Iowa, will now review the bill. Grassley hasn’t expressed explicit support for the bill, but he sent a very strong warning to Trump on Tuesday saying an effort by Trump to fire Mueller would be incredibly risky.

"I think it would be suicide for the president to fire him," Grassley told CNN. "I think the less the president says about this whole thing, the better off he will be. And I think Mueller is a person of stature and respected and I respect him. Just let the thing go forward."

Despite Trump’s threats, some Republican senators, including, crucially, Senate Majority Leader Mitch McConnell of Kentucky, are hesitant to pass Mueller protections into law.

“I think he'll be allowed to finish his job,” McConnell told CNN Tuesday. "I haven't seen clear indication yet that we needed to pass something to keep him from being removed, because I don't think that's going to happen.”

In addition to the bill and the strong warnings from the Hill, a group called Republicans for the Rule of Law ran an ad on Fox News and MSNBC Wednesday morning touting Mueller’s military record and tenure as FBI director under former President George W. Bush and urging people to call their members of Congress and tell them to protect the Mueller investigation.

“Fox and Friends” routinely echoes the president’s criticism of the investigation; on Tuesday a contributor urged Trump to fire Attorney General Jeff Sessions. The ad is an effort to restore confidence in the investigation among Trump’s base. Whether Trump supporters believe Mueller’s findings are the result of a corrupt “witch hunt,” as the president has been telling them, or of a legitimate criminal investigation will be crucial to Trump’s political future.