Back in June 2017, conservative commentator Rush Limbaugh spent many minutes on his radio show extolling Alan Dershowitz, the renowned defense lawyer and Harvard Law School professor, for taking “100 percent Trumpist” positions on the Trump administration’s legal tangles.

“I don’t know what has happened to Professor Dershowitz,” Limbaugh said of the famed civil libertarian. “But whatever it is, I like it.”

On Wednesday, CNN legal analyst Jeffrey Toobin, who was once a student of Dershowitz’s, offered a similar assessment — only he left out that last part.

Toobin and Dershowitz spent 10 minutes on “Anderson Cooper 360” Wednesday night sparring over the decision to tap a special counsel to investigate Russian interference in the 2016 election.

At times, the conversation got personal. When Dershowitz said it was a “mistake” to appoint Robert S. Mueller III to lead the probe, Toobin lashed out.

“Alan, I don’t know what’s going on with you,” he said of his longtime friend and mentor, arguing that a special counsel was necessary.

“How has this come about that, in every situation over the past year, you have been carrying water for Donald Trump?” Toobin said later in the show. “This is not who you used to be, and you are doing this over and over again in situations that are just obviously rife with conflict of interest. And it’s just, like, what’s happened to you?”

Dershowitz parried, saying he had attacked President Trump on other issues, including the proposed entry bans on people from majority-Muslim countries.

“I’m not carrying his water. I’m saying the exact same thing I’ve said for 50 years. And, Jeffrey, you ought to know that, you were my student,” he said. “The fact that it applies to Trump now rather than applying to Bill Clinton is why people like you have turned against me.”

The two widely known legal commentators have gone at it before, but their exchanges haven’t always been this tense.

Last summer, after Trump fired James B. Comey, Dershowitz argued the novel theory that Trump couldn’t obstruct justice by ousting his FBI director, even if his goal was to shut down the Russia investigation, because hiring (and firing) officers of the government is a constitutional power. “Respectfully, I could not think Alan is more wrong,” Toobin said in a June panel discussion with Dershowitz.

Toobin isn’t the only one who’s questioned Dershowitz’s stances on the probe and its many ramifications. Dershowitz, a lifelong liberal and supporter of Bill and Hillary Clinton, has said that many of his old political allies have shunned him as he has made his case in television appearances and commentaries over the past year, as The Washington Post’s Fred Barbash reported.

Legal scholars have criticized Dershowitz’s arguments about obstruction of justice, including Daniel J. Hemel and Eric A. Posner of the University of Chicago, who wrote that the theory “crumbles under scrutiny.” Dershowitz told The Post in December that almost all of his Harvard colleagues disagree with him, and that those lawyers and scholars who do accept his views are afraid to say so publicly.

“None of my liberal friends invite me to dinner anymore,” Dershowitz said. “Thanks to Donald Trump, I’ve lost seven pounds. I call it the Donald Trump diet.”

In a column for the Hill on Wednesday, Dershowitz argued that the president was right to say that Mueller never should have been appointed to investigate the “so-called Russia connection.” The decision, he said, “has politicized our justice system beyond repair.” He advocated instead for a nonpartisan commission like the one that investigated the 9/11 terrorist attacks.

Trump cited Dershowitz’s words on Twitter Wednesday (and it wasn’t the first time).

In the CNN segment with Toobin, Cooper noted that the president was “very publicly echoing your argument.” Dershowitz defended himself.

“Collusion is not a crime. Obstruction of justice may not be a crime if the president engages in it as part of his constitutional authority,” Dershowitz said. “So I still take the position that it was a mistake to appoint a special counsel, that an investigative commission would have been better. The fact that the president quotes me is not something I control.”

Toobin seemed exasperated. He said appointing Mueller was a necessity because Attorney General Jeff Sessions had campaigned for Trump in 2016. It was mandatory, he said, “if we want to have a legal system that deserves any respect.”

“This is so obviously a conflict of interest,” Toobin said, “and this was the only way to resolve it.”