Hamburg's state minister for education, Ties Rabe, said in response to the ruling that he would seek to change the state's law, and that "only if students and teachers have a free and open face can school and lessons function."
The German state of Schleswig-Holstein recently failed to pass a ban on niqabs in universities and colleges, but Bavaria has had a similar ban since 2017.
European countries have moved toward banning niqabs and other religious garments in recent years.
A Dutch ban on wearing "face-covering clothing" in hospitals, schools, government buildings, and on public transit went into effect in August 2019. One law professor at a Dutch university suggesting it would be to the detriment of religion's role in the public square.
Austria implemented a bans on wearing burqas or niqabs in some public places in 2017. They have been banned in public in France since 2010.
In a 2017 ruling The Court of Justice of the European Union allowed a qualified ban on hijabs in the workplace. The ban additionally forbade other religious garb, including crucifixes, skullcaps, and turbans, from being worn while at work, depending on internal company rules.