WATCH: The Quebec Court of Appeal, the highest court in the province, has ruled that a woman who was ordered to remove her hijab in court three years should have been heard by the court. Global's Anne Leclair reports.

A Quebec judge who tried to oblige a woman to remove her hijab in court has lost a legal bid to avoid appearing before the provincial judicial council.

The Supreme Court of Canada announced Thursday it won’t hear the appeal of Quebec court Judge Eliana Marengo, who had challenged the legitimacy of the probe by the body that oversees the conduct of provincially appointed judges.

Marengo argued that the council’s inquiry breached the principle of judicial independence.

As is customary, the high court did not give reasons for its decision not to hear Marengo.

The affair stems from a 2015 courtroom incident involving Rania El-Alloul, a Montreal woman who was told by Marengo to remove her hijab if she wanted a case involving her impounded car to proceed. El-Alloul refused, and her case was adjourned.

The judge contended that El-Alloul was violating a Quebec law stipulating people must be “suitably dressed” in the courtroom.

“Decorum is important. Hats and sunglasses, for example, are not allowed. And I don’t see why scarves on the head would be either,” Marengo said at the time.

“I will therefore not hear you if you are wearing a scarf on your head, just as I would not allow a person to appear before me wearing a hat or sunglasses on his or her head, or any other garment not suitable for a court proceeding.”

In February 2018, the Court of Appeal also found against her, ruling that “the continuation of the inquiry by the committee, while a delicate exercise in the circumstances, is the only possible avenue for an enlightened justice.”

In October, the Court of Appeal ruled in a separate case that obliging El-Alloul to remove her Muslim head scarf was a violation of her fundamental rights.