MONTREAL -- 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."

The judge's comments triggered numerous complaints to the judicial council, which decided 28 of them were founded. It formed a committee to investigate Marengo's conduct in June 2016.

Marengo asked Quebec Superior Court to force the judicial council to end its investigation and lost in February 2017.

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.