Italian police on Friday shot dead the prime suspect in the Berlin Christmas market attack, ending a frantic four-day hunt for Europe's most wanted man.
But just as German Chancellor Angela Merkel expressed relief that suspected attacker Anis Amri no longer posed a threat, she pledged a "comprehensive" analysis of how he was slipped through the net in the first place.
Amri, a 24-year-old Tunisian, is believed to have hijacked a lorry and used it to mow down holiday revellers at the market on Monday, killing 12 and wounding dozens more.
"We can be relieved at the end of this week that the acute danger is over," Ms. Merkel told reporters.
"However the danger of terrorism in general endures, as it has for several years. We all know that."
The Islamic State jihadist group has claimed responsibility and released a video on Friday in which Amri is shown pledging allegiance to Islamic State chief Abu Bakr al-Baghdadi.
He had been missing since escaping immediately after the attack, but his time on the run was cut short thanks to a combination of luck and the quick reflexes of rookie Italian police officer Luca Scata.
The 29-year-old, still officially a trainee, shot the Tunisian twice after he had fired on his patrol partner, Christian Movio, 36.
The officers had stopped Amri in the early hours of Friday, near Milan's Sesto San Giovanni train station. They had no idea of who they were dealing with.
"He was completely calm, they asked him to empty his backpack and with a sudden movement he pulled out the pistol, which was loaded and ready to use," said Roberto Guida, the neighbourhood police head.
Police said Amri had initially tried to pass himself off as being from southern Italy and had shouted expletives against police in Italian before opening fire.
Amri's death came as German police arrested two brothers on suspicion of planning to attack a shopping mall, while authorities in both Australia and Indonesia reported that Christmas terror plots had been foiled.