A Quebec judge told a woman in Montreal this week that she would not hear the case until the woman removed her hijab.

Rania El-Alloul has said she couldn't believe what was happening as she appeared before the Court of Quebec judge in a bid to get her car back after it was seized by the province's automobile insurance board.

"When I made landing in Canada, I was wearing my hijab," El-Alloul 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 any more."

Head coverings have been at the heart of several legal debates and controversies in Canada. Here's a look at some of them.

1. Sikh Mounties permitted to wear turbans

When Baltej Singh Dhillon immigrated to Canada from Malaysia in 1983, he brought the beliefs and customs of his Sikh faith with him. But when he wanted to join the RCMP — a police force deeply steeped in its own traditions, right down to the Stetson hat — he faced a choice.

Dhillon opted to argue for his religious rights and asked for an exception to be made to allow him to wear his turban. He was permitted to wear his turban while training, and in 1990, the federal government ended the ban preventing Sikhs in the RCMP from wearing turbans.

There were protests, but Dhillon said he was "willing to look these people in the eye and tell them that I'm no different from them."

The federal decision was not an instant one, coming a year after an RCMP recommendation that the turban ban be lifted. In the meantime, protests had mounted.

Herman Bittner, an Alberta man who made a calendar to protest the decision, said: "Am I really a racist, or am I standing up and trying to save something that you know can be lost forever?"

2. Turbans on the soccer pitch

Baltej Singh Dhillon, first RCMP turbaned officer, plays with Harshaan Ahluwalis during a friendly soccer match in solidarity with young players who wear turbans on June 15, 2013 in Montreal. (Paul Chiasson/Canadian Press) In 2013, controversy swirled after the Quebec Soccer Federation announced a ban on players wearing turbans or related religious headwear on the pitch. headwear

The ban, which the federation said was a result of safety concerns, came despite a directive from the Canadian Soccer Association that said turbans were OK.

After hearing from FIFA, the international soccer body, the federation reversed the ban and said it was "deeply sorry" if anyone was offended.

3. Taking a citizenship oath

In 2011, then immigration minister Jason Kenney announced new rules banning face coverings for people taking the Canadian citizenship oath.

Until then, a citizenship clerk or other official could pull aside a woman wearing a niqab at the ceremony and have the woman lift it for identification.

But the law came under court scrutiny after Zunera Ishaq, a Pakistani woman living in Mississauga, Ont., argued that the ban violated her rights under the Canadian Charter of Rights and Freedoms.

In February 2015, a Federal Court judge ruled that women can wear a niqab while taking the oath.

Prime Minister Stephen Harper has said the federal government will appeal the ruling, a decision critics have questioned.

4. Testifying in court

In April 2013, an Ontario judge ruled that a woman had to remove her niqab to testify in a sexual assault case.

The decision came after the judge applied a new test set out by the Supreme Court of Canada dealing with witnesses wearing a veil.

In the split decision, the majority ruled that judges have to do a four-part test to determine if a Muslim woman can be allowed to wear a niqab when testifying:

Does she have a sincere belief in her religion?

Does wearing a veil create a serious risk to trial fairness?

Is there any other way to accommodate her?

If no, does what the court called the "salutary" effects of ordering her to remove her niqab outweigh the "deleterious" effects of doing that?

The woman had been fighting for six years for the right to wear her niqab during the trial of her uncle and cousin, who were accused of sexually assaulting her when she was a child in the 1980s.

The woman decided to “compromise” in early 2014, and testified without her niqab with the public excluded from the courtroom, her lawyer told the National Post. The sexual assault charges against the men were withdrawn by the Crown.

5. At the voting booth

In 2007, Quebec's chief returning officer said Muslim women would be able to wear a niqab when receiving a ballot for the provincial election, a position that set off fierce debate. Party leaders urged him to reverse the decision, which he eventually did. A similar controversy arose in Quebec six months later during federal byelections.

On the Elections Canada website, it currently says if an elector wearing a face covering arrives to vote, the deputy returning officer will ask the elector to show their face.

"If the elector agrees to remove their face covering, the election official will follow regular voting procedures," the website says.

"If the elector does not wish to remove their face covering, the deputy returning officer will advise the elector that they must provide two pieces of authorized identification, one proving their identity and the other proving their identity and address, and then take an oath attesting to their eligibility to vote."

If that is done, regular voting procedures will follow.