A Muslim lawyer in Spain said Wednesday she was ejected from a courtroom for wearing a head scarf and has filed a discrimination complaint with the body that oversees Spain's judiciary system.

Spanish law stipulates that trial lawyers must wear black robes but says nothing about head scarves.

The General Council of the Judiciary, which supervises the Spanish court system, said it has opened a preliminary probe of the judge named in the complaint. An official with the council said he could not recall a similar incident. The official spoke on condition of anonymity in line with council rules.

The attorney, Zoubida Barik Edidi, a Moroccan-born Spaniard, said she was attending an Islamic terror trial Oct. 29 at the National Court when Judge Javier Gomez Bermudez kicked her out of the room because of the purple scarf.

Barik Edidi, 39, was sitting next to a colleague acting as defense attorney, but was not formally part of the defense team.

The judge said defense attorneys or prosecutors at a trial cannot wear such a garment, she told The Associated Press.

"Madam, you cannot remain in this courtroom," she quoted the judge as saying.

Barik Edidi noted that she was not a defense attorney per se, and had attended the previous day's session without the judge complaining about her scarf. Gomez Bermudez said he had erred and should have thrown her out the first time.

"This is my courtroom and here I give the orders," Barik Edidi quoted the judge as saying.

Barik Edidi said her complaint accuses the judge of discrimination and abuse of authority, and that she is concerned about his action possibly being copied by other judges.

"The fear I have is that I will not know what courtrooms I am allowed into and which ones I am not," she said.

During that same trial — involving nine men accused of recruiting suicide bombers to go to Iraq — Gomez Bermudez expelled a witness who wore a burka-style outfit and refused his request that she show her face. The judge said Spanish court rules bar people from testifying with their face concealed.

"If I see your face, I can tell if you are lying or not, or if a question catches you off guard," the judge said then, according to the newspaper El Pais.

In the end, witness Fatima Hsisni — the sister of a man who allegedly conducted a suicide attack in Iraq — reached an agreement with the judge to testify another day with her face uncovered, albeit without video cameras running or an audience in the court.