A Canadian judge who wore a "Make America Great Again" hat into his courtroom the day after Donald Trump was elected president last November faces a disciplinary hearing on Wednesday that could cost him his job.

The two-day public hearing for Ontario Court Justice Bernd Zabel of Hamilton is believed to be the first of its kind – testing whether an alleged act of political partisanship is grounds for removal.

"I'm not aware of any other case where a judge has reached a hearing over wearing something or even saying something that would reflect political partisanship," Toronto lawyer Gavin MacKenzie, whose practice includes professional responsibility and discipline, said in an interview.

Story continues below advertisement

Related: Discipline sought for Ontario judge who wore pro-Trump baseball cap

There were a record 81 public complaints about Justice Zabel's behaviour to the Ontario Judicial Council, which is conducting the hearing at a time of heightened public scrutiny of judges. In March, Robin Camp of Alberta resigned from the bench after a disciplinary panel recommended his removal because he had asked a complainant in a rape trial why she didn't keep her knees together. (By comparison, there were 69 complaints against Mr. Camp.) The federal government later passed a law requiring all candidates for the federal bench to study sexual-assault law.

The Globe first reported that Justice Zabel wore his hat into his courtroom, two days after it happened. An audio recording from the courtroom showed that he said, "Just a celebration of an historic night in the United States." Public complaints poured in, and the judge, who was appointed by a provincial Liberal government in 1990, apologized and said he had made a misguided attempt at humour. But the audio recording also showed that he said, the same morning, "brief appearance for the hat. Pissed off the rest of the judges because they all voted for Hillary, so I was the only Trump supporter up there, but that's okay." Suddenly and without public notice, even to litigants, the judge stopped hearing cases on Dec. 21.

Justice Zabel has yet to file a response to the allegations, one of his lawyers, Giulia Gambacorta, a former prosecutor who now is a criminal defence lawyer in Hamilton, said Friday. She would not say what his defence will be.

Partisanship undermines what it is to be a judge, according to Toronto lawyer Brian Gover, who has represented judges in previous cases.

"Judges are meant to be entirely apolitical. It's part of being seen to be impartial. Donald Trump even at that point [when Justice Zabel wore the hat] was seen to stand for a number of things that I think most Canadians would view to be inconsistent with Canadian values."

And that alleged loss of impartiality taints Justice Zabel, by making him appear supportive of the president's statements on women and minorities, said Faisal Mirza, the chair of the Canadian Muslim Lawyers Association.

Story continues below advertisement

"There is no doubt that the Trump campaign, and that hat, is affiliated with intolerant, if not racist, remarks about every identifiable group that you can think of. A judge who works in a place like Hamilton should know there's a visible minority population that routinely appears in those criminal courts."

Thus, the hearing will serve as a test of whether disciplinary bodies are serious about judicial accountability, he said.

"Historically, judges who engaged in offensive, racist or sexist comments have essentially gotten passes – they got counselling and came back as if nothing happened," Mr. Mirza said. "And we don't want to see that continue."

Justice Zabel will be facing a four-person panel: Ontario Appeal Court Justice Robert Sharpe, a former executive legal officer at the Supreme Court of Canada; Ontario Court Justice Leslie Pringle; lawyer Christopher Bredt; and community member Farsad Kiani. Linda Rothstein, a lawyer who has been involved in several high-profile inquiries, such as one into the City of Toronto's computer-leasing scandal, will present the case against him.

A range of consequences is possible, including a warning, an order to take counselling, a suspension or a recommendation to the Ontario Attorney-General that he be removed. Since 2002, the Ontario Judicial Council has held nine public disciplinary hearings. None resulted in a recommendation for removal. One judge resigned before evidence was called. Another judge resigned after council ruled he had committed misconduct.