Even judges can get conned, a Santa Clara County judge all but conceded Friday.

Con man Vincent Cardinalli tricked Judge James Kleinberg and another judge last year into giving him blanket permission to file nuisance lawsuits in small-claims court from behind bars — in violation of state law.

The problem with that was Cardinalli had been declared a ”vexatious litigant,” or legal pest. Under the law, he must obtain permission from the presiding judge to sue anyone in any court.

Stopping short of admitting he made a mistake, Kleinberg put things right Friday and took the unusual step of explaining how things went wrong.

“I’m one of four civil-case managers,” he said, after the hearing ended and the court reporter stopped transcribing. “Each one of us is assigned 1,400 cases. So it’s not surprising things don’t always go smoothly.”

The mistake was particularly irksome to the people Cardinalli originally swindled because it came after Commissioner Greg Saldivar, for nearly a decade, overlooked obvious signs the towing company owner was running a scam in small claims court.

So far, Cardinalli has sued two jail guards on the grounds they might beat him up and the county for allegedly overcharging him $39 in jail medical fees.

Now, Cardinalli, who is serving a 14-year sentence in prison for filing fraudulent lawsuits, no longer can sue anyone willy-nilly. But the two lawsuits he already has filed in small-claims court still stand.

Cardinalli wasn’t present Friday, though the judge had tried to set up a telephone conference. But his presence was keenly felt through a series of erroneous legal arguments he made in writing, which the judge carefully rebutted for the record — one by one — in anticipation of an inevitable appeal.

Kleinberg’s ruling pleased John Castro Jr., a retired San Jose firefighter who filed the original request in 2007 to have Cardinalli declared a legal pest in all courts. At that time, Kleinberg agreed. But he changed his 2007 court order to exclude small claims after Cardinalli complained to then-presiding Judge Jamie Jacobs-May, and she sided with him. Both judges based their opinion on a 1993 case that was nullified by the state Legislature in 1994. “On behalf of myself and a whole lot of people, I thank you,” Castro told Kleinberg.

Outside the courtroom, Castro said, “It sounded like he was humbled. I think he feels good about correcting it.”

Jacobs-May admitted this week she made a mistake.

Castro credited Fairfield attorney Greg Adler for leading the crusade against Cardinalli and being the legal mastermind behind the long battle to have him declared a legal pest. Adler also exposed Cardinalli’s original lawsuit mill and brought the case to prosecutors.

“He’s my Erin Brockovich,” said Castro, comparing Adler to the environmental activist who discovered a systematic cover-up involving contaminated water against tall odds.

Cardinalli would tow vehicles, sell them without notifying owners and then sue the owners in small claims court for towing and storage fees, presenting phony information to justify his claims. Sometimes, he sued people who had never even owned the vehicle.

Adler, who also attended the hearing, praised Kleinberg.

“Judge Kleinberg is a very smart judge, and he has a very big caseload,” Adler said. “Good judges are the kind that make things right.”

Contact Tracey Kaplan at 408-278-3482.