SAN FRANCISCO — Embattled Contra Costa County Judge Bruce C. Mills has been censured and barred from ever returning to the bench as a result of the three latest misconduct complaints against him.

The state Commission on Judicial Performance, which disciplines judges, announced Tuesday it had imposed the punishment because the newest misconduct counts were found to be true earlier this year.

The move means Mills, who retired on May 30, cannot serve as a substitute judge or judicial officer anywhere in California. Retired judges typically can temporarily return to the bench when a regular judge goes on vacation or takes sick leave.

Start your day with the news you need from the Bay Area and beyond.

Sign up for our new Morning Report weekday newsletter.

It is the most serious punishment the commission could have meted out to Mills.

In March, a judicial panel determined Mills had committed three counts of misconduct in a couple of 2016 cases. In one, Mills jailed a man for 25 days, then later revoked his good behavior credits outside of a court hearing. In another case, Mills was found to have had an improper conversation with the prosecutor in a drunken driving trial.

For Mills, it was the sixth discipline he faced since 2001. The most recent came in 2013, when he was found to have improperly interfered with a DUI case involving his son.

“Given (Mills’) extensive history of discipline, the seriousness of the misconduct in the present matter, the judge’s failure to appreciate the impropriety of his conduct, and his lack of candor as evidenced by his shifting explanations for his conduct, the commission concluded that there was a strong likelihood that Judge Mills will engage in subsequent misconduct if he were to serve in a judicial capacity in the future,” commissioners wrote in a news release Tuesday.

Two of the misconduct counts stemmed from Mills’ decision in 2016 to jail San Ramon resident Joseph Sweeney for 25 days over his blog posts that described his long, contentious divorce case. Mills ruled Sweeney’s writings violated a previous judge’s order not to disclose personal details about his ex-wife.

Ironically, Sweeney, a judicial reform advocate, had testified in favor of auditing the Commission on Judicial Performance days before he was jailed.

During the sentencing hearing, Mills said Sweeney would get good behavior credits and “only serve half” his sentence, according to the transcript. In California, nonviolent offenders can get their sentences cut by up to 50 percent for good behavior.

After Sweeney was transferred to jail, the Contra Costa sheriff asked whether good behavior credits applied. According to the commission’s findings, Mills then moved to revoke Sweeney’s good time credits outside of a court hearing.

After Sweeney’s lawyer complained, Mills again changed course and restored the credits. Mills later wrote in a legal brief this was to avoid a legal dogfight, given “Sweeney’s past litigation history of filing appeals, motions, as well as complaints against the (CJP).”

Mills said in his July disciplinary hearing he was still unsure to this day whether good time credits apply to contempt cases. But judicial commissioners say he is missing the point.

“It is not his interpretation of the law or his legal ruling that is at issue, it is the fact that he issued an ex parte modification of an order involving a deprivation of liberty without providing the parties an opportunity to be heard,” commissioners wrote in their decision, released Tuesday.

Mills maintained that he had done nothing wrong as late as his final discipline hearing in July. There, he asked commissioners to reverse the three new misconduct findings against him, saying the panel that made the findings “got this wrong.”

Mills also told the panel although he had retired, it wasn’t because of the pending disciplinary action. He could not be reached for comment Tuesday.

Mills was appointed by Gov. Pete Wilson in 1995.