A German court in the state of Bavaria ruled on Thursday against restrictions in the state barring Muslim legal trainees from wearing headscarves.

The district court in Augsburg ruled in favor of the 25-year-old legal student who brought a complaint against the state for prohibiting her from wearing the headscarf at public appearances in the court while performing a legal training.

The judges ruling on the case said there was no legal basis for the restriction and "no formal law that obliges legal interns to a neutral worldview or a religious neutrality," according to a court document explaining the decision.

The ruling could pave the way for the first female legal officials wearing a headscarf in Bavaria.

Bavarian Justice Minister Winfried Bausback said he would appeal the ruling, arguing that legal officials as well as trainees in the court needed to present the appearance of impartiality.

"Every party, every defendant and every other person involved in the legal process, anyone that comes in contact with the judiciary, needs to be able to trust in the independence, the neutrality and the clear objectivity of judges and prosecutors," Bausback said.

Under the traditionally Roman Catholic state's 8-year-old regulation, a Muslim judicial trainee is prohibited from wearing a headscarf in the courtroom and during hearing of witnesses and expert opinion.

In the case of the German-Pakistani student, she was not allowed to sit at the judge's bench during training as is the case with other students. Instead, she was forced to sit in the observer's area. Due to this discrimination she sued.

The wearing of the headscarf while acting in an official capacity has long been a contentious issue, especially for teachers. Last year, the Federal Constitutional Court ruled a blanket ban on teachers wearing the headscarf was illegal, unless it can be proven that the headscarf constitutes a "concrete danger."

cw/kl (AP, dpa, epd)