BERLIN — Germany’s lower house of Parliament on Thursday agreed on draft legislation that aims to prevent civil servants, judges and soldiers in Germany from wearing full-face veils at work.

In December, Chancellor Angela Merkel called for a ban on full-face Muslim veils “wherever legally possible.” With five months to go before a federal election, Ms. Merkel’s party, the Christian Democratic Union, has lost some support to an anti-immigrant party, Alternative for Germany, as Germany struggles to deal with a migrant crisis.

More than a million migrants, many of them Muslims from the Middle East, have arrived in Germany over the past two years, and concerns about integration are widespread.

“Integration also means that we should make clear and impart our values and where the boundaries of our tolerance toward other cultures lie,” Interior Minister Thomas de Maizière said. “The draft law we have agreed on makes an important contribution to that.”