Sean Hannity — one of President Donald Trump’s closest confidantes and allies in the media — directly cautioned the president on Friday against firing deputy attorney general Rod Rosenstein.

“I have a message for the president tonight,” Hannity said on his Fox News program Friday evening. “Under zero circumstances should the president fire anybody.”

Hannity’s warning came after the New York Times reported that Rosenstein, who oversees special counsel Robert Mueller’s Russia probe, had proposed wearing a wire to surreptitiously record Trump in 2017 and discussed recruiting Cabinet members to invoke the 25th Amendment to oust him from office.

The report, which Rosenstein has disputed, appeared to increase the possibility that Trump would move to fire the deputy attorney general — something a number of the president’s allies, including Fox News’ Laura Ingraham, urged him to do in a since-deleted tweet.

But Hannity on Friday called the Times piece a “setup” aimed at provoking Trump to commit a “Friday Night Massacre” — a reference to former President Richard Nixon’s infamous “Saturday Night Massacre,” in which he fired Archibald Cox, the special prosecutor investigating Watergate, and accepted the resignations of his attorney general and deputy attorney general.

That episode is seen as marking the beginning of the end of Nixon’s presidency.

Terminating Rosenstein, whom Trump has repeatedly attacked for the better part of a year, could carry similar consequences, as Democrats have warned, because it would be regarded as an effort to kneecap the Mueller probe.

Trump has not explicitly said he’s planning to fire Rosenstein, but implied as much during a campaign rally Friday night.

“Look at what’s going on,” Trump told supporters in Missouri. “You’ve got some real bad ones — you see what’s happened at the FBI. They’re all gone. They’re all gone. But there’s a lingering stench, and we’re gonna get rid of that, too.”

But Hannity said that Trump should “definitely not” move to fire Rosenstein or “anybody” else — presumably a reference to Attorney General Jeff Sessions, whom Trump has also attacked repeatedly.

“They’re hoping he gets mad, that he gets sick and tired of it and that they can turn this politically into their version of a Friday Night Massacre,” Hannity said Friday, adding that the “deep state is crumbling from within.”