Judge Eliana Marengo told Rania El-Alloul on Tuesday that she was not dressed suitably for the courtroom, which is a secular place, according to an audio recording of the proceedings obtained by the Canadian broadcaster Thursday.
"Hats and sunglasses for example, are not allowed. And I don't see why scarves on the head would be either," Marengo said.
"The same rules need to be applied to everyone. 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," she said before taking a 30-minute recess.
When she returned, the judge told El-Alloul that she had two choices: either remove her headscarf or apply for a postponement in order to get legal advice.
El-Alloul said she could not afford a lawyer and she did not want to postpone the case, either, which prompted Marengo to adjourn the case indefinitely.
El-Alloul was in the court to file an application to get her car back after it was seized by Quebec's automobile insurance board, according to CBC.
In an interview with the broadcaster, El-Alloul said she could not believe what was happening.
"When I came the first day when I made landing in Canada, I was wearing my hijab," she said.
"When I swore by God to be a good Canadian citizen, I was wearing my hijab, and the judge, I shook hands with him the same day I became Canadian. I was really very happy. But what happened in court made me feel afraid. I felt that I'm not Canadian anymore," she said.
El-Alloul said she wanted to speak out because she did not want any other Muslim woman to go through what she went through.
"When she insisted I should remove my hijab, really I felt like she was talking with me as ... not a human being. I don't want this thing to happen to any other lady. This is not the work of a judge. She doesn't deserve to be a judge," she said.
The CBC said Marengo did not respond to a request for comment.