Alaska's highest court ruled Friday that Nome Superior Court Judge Timothy Dooley made inappropriate comments while on the bench that harmed witnesses and victims and betrayed the public's perception of the court's integrity.

Dooley was censured — essentially a public statement of wrongdoing — by the Alaska Supreme Court in the decision, the culmination of an ethics complaint and subsequent recommendation from the Alaska Commission on Judicial Conduct.

The Alaska Supreme Court accepted the commission's findings, made in its recommendation in December, that Dooley's statements in open court were negligent, "undignified and discourteous" and "suggest bias or prejudice." The actions harmed the public's perception of the court system, it wrote in the decision.

Dooley and the commission agreed in December that the comments were inappropriate and that he had violated the Alaska Code of Judicial Conduct.

The comments that led to the complaint against him began several weeks after his appointment by then-Gov. Sean Parnell. The first one occurred on May 29, 2013. During a sentencing, Dooley asked a defendant, "Has anything good ever come out of drinking, except for sex with a pretty girl?"

A total of five comments were subject to the ethics complaint. In December, Dooley apologized for each comment during the disciplinary hearing. He wrote in a statement to the commission that his May 29 comment "was wrong for me to say especially in view of the fact that sex offenders were present in the gallery."

In December, Dooley spoke of the challenges in transitioning from private practice as an attorney to a judgeship. Dooley said he has "quit going off script," that he regretted causing trouble for the "wonderful people" at the Nome court, and that "my poor wife did a lot of crying at night and I caused her an amazing amount of stress."

During the December hearing, Dooley's attorney Bill Satterberg argued that the court system was partly to blame, having not provided adequate training or support staff for the new Superior Court judge.

The Alaska Supreme Court, however, said Dooley was responsible for his own statements.

"Contrary to the arguments … Judge Dooley is not the victim in this disciplinary matter," the court wrote.

Efforts to reach Dooley for comment were unsuccessful Monday, and Satterberg declined to speak about the ruling.

During the December disciplinary hearing, the Alaska Commission on Judicial Conduct recommended that Dooley be publicly censured and receive a year's worth of mentoring and additional sensitivity training.

Dooley is retiring in February 2017, so the recommendations for training were not ordered by the Alaska Supreme Court.

Public censure is the least severe form of public discipline the commission can recommend, judicial commission Executive Director Marla Greenstein said at the time.

Removal from office is the most severe discipline, and only one judge — Dennis Cummings of Bethel — has faced such a recommendation, Greenstein said. Cummings ultimately retired before the Supreme Court heard the case, though the court still ruled to remove Cummings even after his retirement.