Louis DiLeo, who was let go as Linden’s municipal judge last year amid ethics charges, is suing the city and its mayor, claiming there were ulterior motives for his termination.

In a lawsuit filed Wednesday in Union County Superior Court, DiLeo alleges he was fired because he refused to fix a traffic ticket at the mayor’s request and because he complained to the county assignment judge about his overloaded docket when the mayor would not act.

The complaint, in DiLeo v. City of Linden, includes counts under state whistleblower, discrimination and civil rights statutes, along with common law claims like wrongful discharge in violation of public policy, tortious interference with contract and civil conspiracy.

DiLeo, who was 59 when replaced by the allegedly much younger and less experienced Daniel Roberts in January 2012, also contends he was the victim of age discrimination and was booted six months before his pension and retirement benefits would have vested.

He had held the judgeship since 2003 and before that was the municipal prosecutor.

DiLeo brings his action at the same time he is awaiting a Supreme Court decision on whether he should be publicly reprimanded over a 2010 trial described by a Superior Court judge as a “perversion of justice.”

He is also defending a federal civil rights suit by the defendants in that trial, in which Linden is a codefendant.

DiLeo alleges that during his time on the bench, court income grew from $850,000 to more than $2.6 million in 2010, partly due to added tickets from red-light cameras.

By 2007, when Mayor Richard Gerbounka took office, DiLeo’s caseload allegedly averaged 300 a week, resulting in court sessions “extending late into the day or evening, often without breaks,” he says.

After Gerbounka rebuffed his request to add sessions and hire part-time judges, DiLeo reached out to then-Union County Assignment Judge Walter Barisonek, who wrote to Gerbounka agreeing with DiLeo’s position based on court statistics, the complaint says.

Gerbounka’s letter refusing Barisonek’s request allegedly referred to DiLeo as “overpaid.”

The alleged ticket-fixing request occurred around May 2008 when Gerbounka supposedly sent DiLeo a ticket issued to a Linden resident, not named in the complaint, asking him to “void this ticket,” without providing any “justifying basis.”

DiLeo’s claims his response was to transfer the ticket to another court where Gerbounka could not influence the case and to report Gerbounka to Barisonek, Union County Presiding Municipal Judge Joan Robinson Gross and Union County Prosecutor Theodore Romankow and later, the City Council.

Gerbounka allegedly retaliated because of the criticism directed at him over the attempted ticket fixing and because of DiLeo’s efforts to deal with the court backlog.

His repeated efforts to oust DiLeo began in September 2008, DiLeo alleges.

The “payback” also took the form of interfering with court operations and DiLeo’s supervisory role, according to the complaint.

For example, Gerbounka allegedly tried to deal with complaints about court employees, and had the police investigate whether a court employee stole court funds before the court had a chance to determine whether any money was even missing.

When the City Council passed a resolution adding court sessions and per-diem judges, Gerbounka tried to block it by insisting that DiLeo hold Monday sessions during the summer, and, when he refused, blaming him for the backlog, alleges DiLeo.

The complaint faults Gerbounka for publicly calling on DiLeo to resign when the ethics case was brought in October 2011. That allegedly violated DiLeo’s civil rights because the judiciary had sole jurisdiction over the charges and his employment status should have been treated as confidential.

The ethics matter concerned the trial of cousins Anthony and Wendell Kirkland on disorderly person charges of trying to steal tires from a car and pot possession.

They invoked their right to counsel at arraignment but when they showed up later without attorneys, DiLeo went ahead with the trial, even though the prosecutor, Nicholas Scutari, had allegedly left the courthouse.

In addition to acting as the judge, DiLeo filled in as prosecutor, questioning the police officer and one defendant and then allowing the officer to cross-examine the Kirklands. They were convicted, with one sentenced to 180 days in jail, the other 360 days, and ordered to pay a combined $5,800 in fines.

By the time Union County Superior Court Judge Scott Moynihan overturned the convictions, finding a violation of due process and the right to counsel, along with procedural errors, they had each spent 124 days in jail.

DiLeo’s conduct at the trial “transformed the role of the court from a neutral and detached magistrate and evoked the specter of the backwater ‘judge, jury and executioner’ figure that has never had any place in American jurisprudence,” wrote Moynihan.

On remand, the Kirklands were convicted on a single downgraded breach of the peace charge. The usual fine was waived, given the history of the case, and each paid $33 in court costs.

On April 30, the Supreme Court heard argument on the Advisory Committee on Judicial Conduct’s recommendation that DiLeo be reprimanded for his conduct in the Kirkland matter.

DiLeo’s attorney in the disciplinary case, Anthony Vignuolo of Borus, Goldin, Foley Vignuolo, Hyman & Stahl in North Brunswick, argued that any deprivation of the defendants’ legal or constitutional rights had been corrected on appeal and that committing reversible error is not a basis for disciplining a judge.

DiLeo has also defended the charges on the basis that he believed the Kirklands waived the right to counsel and that his backlogged docket and the late hour affected his actions .

The ethics grievant was Michael Rubas of DiMaggio & Rubas in Springfield, who represents the Kirklands in their civil rights suit, Kirkland v. DiLeo, 12-cv-1196.

On April 15, U.S. District Judge Kevin McNulty in Newark refused to dismiss the case on 11th Amendment and judicial immunity grounds, finding discovery was needed. DiLeo and Linden have appealed.

Gerbounka said on Thursday that neither he nor anyone from the city had seen DiLeo’s complaint but based on news accounts, he referred to it as a “frivolous lawsuit by a disgruntled appointee.”

He also said DiLeo’s performance on the bench, as reflected in the ACJC findings, should be taken into account in considering the credibility of his allegations.

Neither DiLeo, who has a solo family law practice in Linden, nor his lawyer, Patrick Toscano, who heads a Caldwell firm, returned a call. Neither did Roberts, of Charney & Roberts in Linden.

Linden now has two full-time judges, Roberts and Cassandra Corbett, and has added court sessions. There now are eight, in contrast to the three when DiLeo was judge.