The approval came only six months after the right-wing coalition government announced plans to ban headscarves in kindergartens as well.
The measure, which had been proposed by chancellor Sebastian Kurz’s Right-wing coalition government, was passed with the support of the governing center-right People’s Party (ÖVP) and the far-right Freedom Party (FPÖ).
Almost all opposition lawmakers voted against the measure, which they condemned as “discriminatory.”
They also expect that the move would be challenged in Austria’s constitutional court.
The ban will be applied to girls up to around the age of 10 and specifically targets Islamic headscarves.
Though the law refers to ”all head-covering clothes of ideological or religious influence,” it makes exceptions for clothing which only partly covers the hair such as Jewish and Sikh head coverings.
The government has already said it expects the law to face legal challenges.
The organization representing Austria’s Muslims, The Islamic Religious Community in Austria (IGGÖ), described the law as “shameless and destructive.
It has already vowed to challenge it in the Constitutional Court on grounds of discrimination.
“The ban on headscarves in primary schools will only lead to segregation and discrimination of Muslim girls,” said the government-recognized body.
The country had also passed a law in May 2017, banning Muslim women from wearing full-face veils such as burqas and niqabs in public.
Under the law, violators face a fine of 150 euros (nearly $180) and police are authorized to use force with people who resist showing their faces.
Similar restrictions, known as the “Burqa Ban,” have also been adopted in some other European Union countries like, France, Belgium and the Netherlands.
Denmark has also banned garments that cover the face late last month. Those violating the law risk a fine of 1,000 kroner (£118).