Germany will from Monday expand border controls to the frontiers with all nine of its neighbours to stop irregular migrants in a move that has sparked protests from other EU members.
Berlin announced the sweeping measure following a string of deadly extremist attacks that have stoked public fears and boosted support for the far-right Alternative for Germany (AfD) party.
Interior Minister Nancy Faeser on Sunday said that the step aimed to limit irregular migration and "put a stop to criminals and identify and stop Islamists at an early stage".
The border controls will be in place for an initial six months and are expected to include temporary structures at land crossings and spot checks by federal police.
Poland and Austria have voiced concern and the European Commission has warned that members of the 27-nation bloc must only impose such steps in exceptional circumstances.
Germany lies at the heart of Europe and borders nine countries that are part of the visa-free Schengen zone, designed to allow the free movement of people and goods.
Border controls with Poland, the Czech Republic, Austria and Switzerland were already in place before the crackdown was announced.
These will now be expanded to Germany's borders with France, Luxembourg, the Netherlands, Belgium and Denmark.
Faeser said the government hoped to minimise the impact on people living and working in border regions, promising "coordination with our neighbouring countries".
The interior ministry however noted that travellers should carry identification when crossing the border.
In recent weeks, a string of extremist attacks have shocked Germany, fuelling rising public anger.
Last month, a man on a knife rampage killed three people and wounded eight more at a festival in the western city of Solingen.
The Syrian suspect, who has alleged links to the Islamic State group, had been intended for deportation but managed to evade authorities.
The enforcement failure set off a bitter debate which marked the run-up to two regional polls in the formerly communist east, where the anti-immigration AfD scored unprecedented results.
With national elections looming next year, Chancellor Olaf Scholz's government has been under intense political pressure to toughen its stance on migrants and asylum seekers.
Scholz was in Uzbekistan on Sunday to sign a migration deal for workers to come to Germany, while simplifying deportation procedures in the opposite direction so that "those that must go back do go back", the chancellor said.
Closer to home, the German government has presented plans to speed up deportations to European partners.
Under EU rules, asylum requests are meant to be handled by the country of arrival. The system has placed a huge strain on countries on the European periphery, where leaders have demanded more burden-sharing.
Greek Prime Minister Kyriakos Mitsotakis said that Germany tightening its borders means that it would "essentially pass the buck to countries located on the outer borders of Europe".
Austria's Interior Minister Gerhard Karner said his country "will not accept people who are rejected from Germany", while Polish Prime Minister Donald Tusk condemned Germany's move as "unacceptable".
Warsaw has also struggled with migration and accused Moscow of smuggling people from Africa and the Middle East into Europe by sending them through Belarus to the Polish border.
Berlin on Friday said that Tusk and Scholz had discussed the issue and agreed to strengthen EU external borders, "especially in view of the cynical instrumentalisation of migrants by Belarus".
Hungary's nationalist Prime Minister Viktor Orban, meanwhile, mocked the German chancellor on social media site X, writing: "Bundeskanzler Scholz, welcome to the club! #StopMigration."
Germany took in more than a million asylum seekers in 2015-16, many of them Syrians, and has hosted over a million Ukrainians since the start of the Russian invasion in 2022.
The extra burden on municipal authorities and integration services in Germany needed to be "taken into account" when talking about new border controls, Berlin's interior ministry said.
In the Netherlands, Prime Minister Dick Schoof on Friday unveiled the country's strictest migration policy yet, saying it will request an opt-out from EU common policy on asylum next week.
A four-party coalition dominated by far-right firebrand Geert Wilders's Freedom Party wants to declare an "asylum crisis" to curb the influx of migrants through a tough set of rules including border controls.