Celebrity lawyer Alan Dershowitz bigfooted his own legal team in Manhattan court Tuesday as he battled a libel case brought against him by Jeffrey Epstein accuser Virginia Giuffre.

The 81-year-old Harvard Law School professor angrily poked the defense table — where he sat alongside his pack of five lawyers — passed notes to his attorneys and seemed to argue with them every time one of them jumped up to address the judge.

Dershowitz and his lawyers were in Manhattan federal court trying to get the lawsuit against him tossed.

Giuffre, who has described herself as a former 16-year-old “sex slave” of the sick late pedophile Epstein, has said Epstein farmed her out to Dershowitz years ago, including when she gave the married lawyer oral sex in a limo in Massachusetts and had sex with him on a plane. Dershowitz had repped Epstein as he battled some sex raps.

Dershowitz has repeatedly furiously denied ever having sex with Giuffre — much less meeting her — and says his public comments ripping her are covered by free speech.

“I want to vindicate my First Amendment right to be able to say until the day I die: I never met Virginia Giuffre. I never had any sexual encounter with her, and she knows that,” he told reporters outside court Tuesday.

“And when I die, my wife will repeat it. And when she dies, my children will repeat it. I’m taking my [lawyer’s] bar card, which I earned 55 years ago, and I’m placing it on the table, because I will swear under oath that I never met this woman.”

One of Dershowitz’s lawyers argued in court that his client’s statements were OK anyway under libel law, since Giuffre only filed suit against him in April, while he’s been publicly blasting her for several years.

“Once you’re on the internet, you’re immune?” Judge Loretta Preska asked Dershowitz lawyer Howard Cooper, referring to Dershowitz’s longstanding allegations of lying against Giuffre and libel prosecution.

“Yes,” Cooper replied.

But one of Giuffre’s lawyers, Sigrid McCawley, told the judge that Cooper is misstating the law and that his interpretation “gives people license to be serial defamers.”

The judge has yet to decide whether the case will go forward.

Epstein hanged himself in a Manhattan jail cell in August.