BERLIN (Reuters) - The German government on Thursday said it would continue border controls at its border with Austria for six more months to ensure Germany’s security and deal with ongoing migrant flows.

A car drives on an empty bridge crossing the border river Inn at the German-Austrian frontier between Braunau and Simbach am Inn near Passau, Germany at dawn November 1, 2015. REUTERS/Michael Dalder

Interior Minister Horst Seehofer said he valued Europe’s Schengen zone of free travel as one of Europe’s greatest achievements, but he had no choice but to extend the checks at the Austrian border for now.

“Deficits in protection of the EU external borders and the scale of the illegal, secondary migration at the moment allow no other conclusion than that domestic border controls at the German-Austrian border remain necessary,” Seehofer said in a statement released by the ministry.

Germany and other Schengen countries introduced emergency border controls in 2015 after more than 1 million refugees and migrants flooded into Europe. Seehofer has been a frequent critic of Chancellor Angela Merkel’s decision to open the door to the migrants.

His Bavarian CSU conservative party is scrambling to win back voters in the upcoming Bavarian state election. In the national election last September, it bled support to Alternative for Germany, a far-right, anti-immigrant party.

Seehofer had repeatedly vowed to continue the border checks during the national election campaign.

The ministry said the decision to extend the controls, which takes effect on May 12, had been coordinated with France, Austria, Denmark, Sweden and Norway. The six countries had agreed last year to extend the internal border checks until mid-May.

It said it notified other European countries about the decision on Thursday.

Nearly all EU states consider the free-travel Schengen area to be a major benefit of decades of European integration. They are keen to avoid disruptions to travel and trade.

But border checks have become the new reality since 2015, and the bloc is working on changing its laws to allow for the introduction of such measures more easily and for longer periods.