Austria's constitutional court struck down a law banning headscarfs in elementary schools on Friday.
The law had prohibited girls from wearing "ideological or religious clothing that is associated with covering the head until the end of the school year in which they turn 10."
In a statement released following the decision, the court said that equality and "freedom of thought, conscience and religion, establishes the state's religious and ideological neutrality."
The court said the legislature was required to treat various religious convictions equally. The law did not apply to the Jewish Kippa or to the turban worn by Sikh men.
"The school is based, among other things, on the basic values of openness and tolerance," the constitutional court said.
The court decision came after a complaint from two families of Muslim students was brought forward and determined that the law discriminated against girls "because it carries the risk of making it difficult for Muslim girls to access education."
The law was passed by Austrian MPs in 2019 after being tabled by the coalition government, made up of PM Sebastian Kurz' right-wing Austrian People's Party (ÖVP) and far-right Freedom Party of Austria (FPÖ).
The Education spokesman for FPÖ, Wendelin Moelzer had said that the law was ''a signal against political Islam'', while the ÖVP MP Rudolf Taschner declared that it would protect girls against ''enslavement".
The decision by the constitutional court on Friday was "shows that our trust in the rule of law and our patience have paid off," said Austria's Islamic Faith organisation (IGGÖ) in a statement posted to Facebook.
"The enforcement of equal opportunities and self-determination for girls and women in our society is not achieved through prohibitions, but rather by strengthening human, women's and children's rights and promoting the awareness that coercion is never permissible," the IGGÖ statement continued.