A Missouri judge who wore an Elvis Presley wig in his courtroom and played the singer’s music from his phone during court proceedings has agreed to a deal that would cut his career on the bench short.

Judge Matthew Thornhill in suburban St. Louis faces a six-month unpaid suspension under the deal he reached with a state board to avoid a disciplinary hearing. After the suspension, he would serve 18 more months on the bench before resigning from the St. Charles County Circuit Court.

The agreement, reached last month, is pending before the Missouri Supreme Court, spokeswoman Beth Riggert said Friday. The court agreed Thursday to accept 35 letters in support of Thornhill’s character.

Thornhill wrote that he intended “to add levity at times when I thought it would help relax litigants.” But he added: “I now recognize that this could affect the integrity and solemnity of the proceedings.”

Online court records don’t indicate who filed the complaint that triggered the discipline. His attorney, Neil Bruntrager, didn’t immediately return a phone message from The Associated Press on Friday.