A Canadian judge who tried to lighten the mood in a courtroom by wearing a “Make America Great Again” hat, won't be allowed to return to his job for a while.

Bernd Zabel, 69, will keep his $284,000-a-year job after an Ontario Judicial Council panel on Tuesday handed him the second-most serious penalty available, for wearing the Trump hat in court: an unpaid 30-day suspension.

“But he maintained the wearing of the hat was a joke — ‘ill-considered’ he admitted, but meant, he said, to lighten the mood he expected in a courtroom where Trump’s unexpected victory would be what everyone was talking about,” the National Post reported.

The judicial council reportedly received a high-volume of complaints that appeared to be part of a coordinated effort against the judge, as many of the messages contained the same language. However, the council also received nearly as many messages that voiced support for the judge as they did messages attacking him.

The panel described Zabel’s 27-year record on the bench as “unblemished” and said he was the model of “exemplary service.”

“Female colleagues say that he encouraged them when they were at the bar and has been entirely supportive since they joined him on the bench,” the panel noted. “Fellow judges and members of the bar insist that he is an open-minded and impartial judge who does not exhibit polarized, misogynistic, racist or homophobic views.”

Despite his outstanding record on the bench, letters of support, and support from female colleagues, the judicial council strongly considered removing Zabel from office.

“The choice we face is between the second-most serious sanction, suspension without pay for 30 days, perhaps combined with other less serious sanctions, and recommending removal from office,” the panel added.

Zabel has been on paid leave for 9 months over this incident and now starts his 30-day unpaid suspension.