The German government has announced a security package including knife bans and tougher asylum measures after three people were fatally stabbed at a street festival in the western town of Solingen.
The killings shocked Germany and sparked an intense debate over asylum laws when it emerged the main suspect was a 26-year-old Syrian refugee facing deportation.
Issa Al H is being investigated for murder and links to militant group Islamic State (IS).
The government announced its plans three days before elections in two states in eastern Germany, where the far-right Alternative for Germany is riding high in the polls.
In Thuringia, the AfD are being tipped to come first, ahead of the conservative CDU, while in Saxony, opinion polls put the two parties neck and neck.
The anti-immigration party has little chance of coming to power in either state as no other group is prepared to help the AfD form a majority.
However, the vote could end up as a humiliation for the three parties running the federal government as they are all running below 10% in the polls.
Ministers from the Social Democrats, Greens and Liberal FDP held a joint press conference on Thursday to outline what they said were far-reaching measures.
Knives are to be banned at most public events including markets and sport as well as on public transport, and there will be a blanket ban on flick knives.
Foreigners ordered to leave the country will have to be deported more quickly and efficiently, they say. Anyone facing a jail term for knife crime would face fast deportation.
A task force for the prevention of Islamism is being proposed and biometric facial recognition will be used to help identify suspects. IS said it was behind the Solingen attack and a day afterwards released a video purportedly showing the suspect in a mask.
Interior Minister Nancy Faeser said asylum seekers who had already registered in another European Union country would lose their rights to welfare benefits.
Ms Faeser insisted that nobody would be left hungry or sleeping on the streets, as the other EU country would be responsible for paying their benefits.
The suspect in custody in the western city of Düsseldorf had sought asylum in Germany but he was turned down because he had first entered the EU in Bulgaria.
Under the EU’s Dublin Regulation, an application for asylum has to be made in the country of arrival.
The Syrian should have been deported to Bulgaria last year but German reports suggest that the attempt failed because officials had failed to find him.
During a visit to Solingen this week, Chancellor Olaf Scholz said the government would do all it could to ensure “those who cannot and must not stay here in Germany are repatriated and deported”.
His government had already announced plans earlier this year to resume deportations to Afghanistan and Syria in the wake of a deadly attack by a 25-year-old Afghan man in Mannheim.
The leader of the CDU, Friedrich Merz, who met the chancellor this week, called for a halt on allowing refugees from Afghanistan and Syria to enter Germany, but that was rejected by Mr Scholz.
All the planned measures will have to go before parliament before they come into force.