SALEM, Ore. (AP) – The Oregon Supreme Court has handed down the longest suspension in its history to a judge who refused to marry gay couples in the state, but stopped short of removing him from office.

Marion County Circuit Court Judge Vance Day had come to the attention of authorities after allegations including that he had refused to marry gay couples and had broken gun laws. In 2015, an ethics commission recommended that Day be removed from office. Instead, the court Thursday ordered Day suspended for three years.

Phil Lemman, a spokesman for the Oregon Judicial Department, said the suspension was the longest in the court’s history.

The move resolves ethics charges against Day, but does not affect related criminal charges.