​Manhattan federal prosecutors called a surprise witness in the corruption retrial of Sheldon Silver Wednesday — and it threw defense lawyers into a frenzy of objections.

Mary Hesdorffer testified that she warned her oncologist friend and former boss Dr. Robert Taub, who is one of the prosecution’s key witnesses, that “they were going to take him out in handcuffs” for referring patients to the ex-Assembly speaker.

The mesothelioma advocate said she learned through Taub’s patients that he had been referring them to law firm Weitz & Luxenberg, which made money suing over the rare cancer that is caused by exposure to asbestos.

Hesdorffer said she confronted Taub about the referrals without knowing they were actually going to Silver, who was “of counsel” to Weitz & Luxenberg.

She scolded Taub for the “unethical” and “really bad practice,” saying it could “ruin his reputation.” But Taub simply shrugged her off and said “he needed money for his research,” Hesdorffer recalled.

That’s when Hesdorffer, the executive director of a mesothelioma non-profit, dropped the bomb that sent the courtroom into a brief frenzy.

“I told him they were going to take him out in handcuffs …” Hesdorffer said.

Before she could finish the sentence, Silver’s lawyers jumped up and objected. The judge also quickly intervened and told the jury to “disregard” the statement, which was then stricken from the record.

Silver, 74, is on trial in Manhattan federal court for the second time in three years on charges that he sold his office as one of the three most powerful politicians in the state — along with the Senate majority leader and governor — in exchange for $4 million in illegal kickbacks.

More than $3 million of those alleged kickbacks came from Taub, a prominent oncologist with Columbia University.

Earlier this week, Taub told the jury that he sent Silver the names of patients suffering from mesothelioma after Silver, through a friend, indicated that he wanted to be a “rainmaker” at Weitz and Luxenberg.

“Shelly wants cases,” the friend told Taub.

In exchange, Silver helped Taub secure $500,000 in state grants and other favors including jobs for Taub’s children, prosecutors allege.

Later, former Assistant Attorney General Richard Rodgers told jurors about reforms instituted in 2007 by then-Attorney General Andrew Cuomo to force the recipients of legislator-directed funding to certify, under threat of perjury, that they had no ties to legislators who sent money their way.

That backed up Taub’s testimony that Silver told him in 2007 he could no longer give him state funding.

Earlier Wednesday, law firm founder Arthur Luxenberg testified that he hired Silver in 2002 to bring “honor and prestige” to the firm. Instead, the law firm was slapped with a corruption commission subpoena seeking information about the ex-assemblyman’s legal work, Luxenberg admitted.

In October 2013, a year and a half before Silver’s arrest, Weitz & Luxenberg received a subpoena from the now-defunct Moreland Commission seeking information about Silver’s work there, another witness said.

The commission was shut down six month later after Silver blasted it for having “exceeded its mandate” and for having “engaged in a fishing expedition to intimidate legislators.”