A ban on headscarves for elementary school students was discriminatory and unconstitutional because it singled out Muslim girls' headscarves, the Austrian Constitutional Court has ruled.

The court said the law banning headscarves for girls under 10 years old "contravened the principle of equality in relation to freedom of religion, belief and conscience."

Drafters tried to keep the text of the law neutral, banning "ideologically or religiously influenced clothing which is associated with the covering of the head."

Judge Christoph Grabenwarter, however, said additional material from the government made it clear that the law could only be understood as targeting Muslim head coverings. The law violated the principle of equality and the state's obligation to be religiously neutral because it singled out Muslim students.

Grabenwarter voiced concern of the ban's effects on students.

"It carries the risk of hindering Muslim girls' access to education and more precisely of shutting them off from society," Grabenwarter said, according to the German news site Deutsche Welle.

Austria's coalition government of the center-right People's Party and the far-right Freedom Party passed the measure in 2019, just days before the government collapsed amid a corruption scandal.

Backers depicted the proposal as a "child protection law," claiming it protected girls and women against sexism and politicized Islam. They also said it would protect the nation's culture from Islamic influences and the infiltration of parallel societies.

The new government, a coalition of the People's Party and the left-wing Green Party, had wanted to extend the ban to girls under age 14.

Two Muslim children and their parents challenged the law, noting that it applied only to headscarves and not to smaller religious head coverings like those of Jewish or Sikh boys. In addition to religious freedom and equality concerns, they objected to the law's infringement on religious upbringing of children.

Umit Vural, president of the Austrian Islamic Faith Community, praised the decision, the German news site Deutsche Welle said.

"Equal opportunity and the autonomy of girls and women in our society cannot be achieved through bans," said Vumal, who also criticized pressuring girls to wear a headscarf.

"We don't condone disparaging attitudes towards women who decide against the headscarf... and we also cannot agree with the curtailing of the religious freedom of those Muslim women who understand the headscarf to be an integral part of their lived religious practice."

People's Party Education Minister Heinz Fassmann said the ministry would "take note of the judgement and look into its arguments."

"I regret that girls will not have the opportunity to make their way through the education system free from compulsion," he said, according to Agence France Presse.

In 2018 the Muslim community in Austria had voiced concerns over the proposal, calling the proposal "counterproductive." They said that "very few" girls under age 10 wear headscarves to school.

(Story continues below)