A federal judge has fined a former lawyer for wife-killer Drew Peterson $50,000 and ordered him to take ethics and anger management classes as a result of his conduct in her courtroom.

U.S. District Judge Virginia Kendall also said in a 15-page opinion she will refer lawyer Joel Brodsky to the court’s executive committee to be barred or suspended from practicing in federal court in Chicago.

“Sadly, the court learned of numerous other instances in state court where Brodsky has been left unscathed by sanctions which might have led to his belief that he could act with impunity when acting as a litigator in court,” Kendall wrote. “That stops here.”

Joe “The Shark” Lopez — another veteran of Peterson’s defense team — represents Brodsky. He’s studying the order to determine how to proceed and will likely ask the judge to reconsider.

“At times he’s kind of over the top and he’s overzealous on behalf of his clients,” Lopez said of Brodsky.

A Will County judge also once took issue with Brodsky’s conduct following Peterson’s conviction in 2012. Peterson has famously pinned the blame for his conviction on Brodsky, who led his defense team at the time.

Kendall’s order Wednesday was the result of a long-running dispute that emerged in an odometer rollback case that might have otherwise gone unnoticed. The judge wrote that Brodsky’s conduct “soon overshadowed the legal case and became the focus of numerous court hearings.”

“Throughout the course of the litigation, the court has observed first-hand Brodsky’s unprofessional, contemptuous and antagonistic behavior directed at opposing counsel,” Kendall wrote.

The judge said Brodsky sent “vitriolic emails” to other attorneys in the case. In one, he wrote, “how do you even call yourself a lawyer? You are an embarrassment to the profession.”

Kendall noted Brodsky even made accusations against an expert witness that included fabricating a son.

The judge wrote that Brodsky later “gave an apology in name only. He did not appear contrite and did not offer any explanation for his conduct.”

“Once an individual is given the privilege to serve as a lawyer, as an officer of the court, he is held to professional standards that are essential to the preservation of justice and the protection of those clients he serves,” Kendall wrote. “Any deviance from that course of professional conduct should not be tolerated.”

Lopez said Wednesday the judge appeared to be “sending a message to everybody.”