German lawmakers on Thursday approved a partial ban on the full-face burqa Islamic veil and a package of security measures aimed at preventing extremist attacks.
The new laws follow several jihadist attacks, including a truck rampage through a Berlin Christmas market that claimed 12 lives, and come ahead of September elections.
The new law on facial coverings falls short of a total ban in public places demanded by right-wing parties, like that in effect in neighbouring France since 2011.
The prohibition will apply to public servants -- including election officials, military and judicial staff -- performing their duties.
"The state has a duty to present itself in an ideologically and religiously neutral manner," says the text of the law passed by the lower house in the evening.
Germany has since 2015 taken in more than one million migrants and refugees, most from predominantly Muslim countries.
This has stoked a xenophobic backlash and boosted the right-wing populist Alternative for Germany party, which has attempted to link the influx to a heightened threat of terrorism.
'Limits of tolerance'
Interior Minister Thomas de Maiziere said the social integration of immigrants requires "that we make clear and communicate our values and the limits of our tolerance to other cultures".
The ban on full facial coverings allows exceptions -- for example, for health workers protecting themselves against infections or police officers concealing their identity.
People can also be required to remove facial coverings in order to match them with their identity papers.
New security measures also include the use of electronic ankle bracelets, if approved by a judge, for people deemed a security threat, in federal police cases -- such as known Islamic radicals considered potentially violent by security services.
Another law paves the way for national and state police forces to pool their data in a new integrated IT system.
Under another new measure, Germany will implement EU rules on the exchange of flight passenger data to counter terrorism and serious crime.
And physical attacks on police, emergency services and military personnel on duty will in future be punished more severely, with up to five years' jail.
The reforms follow the December 19 truck attack in Berlin claimed by the Islamic State group. The suspect, 24-year-old Tunisian national Anis Amri, was shot dead four days later by Italian police.
The Amri case sparked public anger after it emerged he had already been in the crosshairs of security services and should long ago have been sent back to Tunisia, which for months refused to take him.
National and state police and security services had monitored Amri for months, knowing that he had used multiple identities and addresses and had been in contact with radical Islamists.