The Berlin market attacker, Anis Amri, has been shot dead by police in Milan.
The Tunisian criminal fired on police who asked him for ID during a routine patrol in the Sesto San Giovanni area in the early hours of Friday.
German authorities say fingerprints they provided have confirmed the dead man is Amri. They are trying to find out if he had accomplices.
Monday’s attack on a Berlin Christmas market left 12 people dead and 49 injured.
German Chancellor Angela Merkel said she was “relieved” that the attacker had been neutralised but added that Islamist terrorism was “a recurring threat to us”.
Her government’s main priority was to protect German citizens, she told journalists, adding that this case had raised “many questions”.
“Further changes to our laws and regulations will have to be made,” Mrs Merkel said at a news conference.
But leading Eurosceptics – including French National Front leader Marine Le Pen – have criticised open European borders, a result of the Schengen pact, for allowing a fugitive to move between countries.
Meanwhile, the self-styled Islamic State (IS) group has released a video showing Amri pledging allegiance to its leader, Abu-Bakr al-Baghdadi.
He does not make any reference to the Berlin attack, which IS claimed soon afterwards. It is not clear when or where the video was filmed.
Shortly before releasing the video, IS acknowledged Amri’s death in Milan.
When Italian police stopped the suspect, who was on foot, at 03:00 (02:00 GMT), he “immediately drew out a gun” and shot at the two policemen, Italian Interior Minister Marco Minniti said.
Officer Cristian Movio was injured in the shoulder but his injuries are not life-threatening.
His junior colleague, Luca Scata, who had been in the police for just nine months, was the one who fired the shot which killed Amri.
German officials found Amri’s fingerprints inside the truck that was used in Monday evening’s attack.
Federal prosecutor Peter Frank said the focus of the criminal investigation into the killings now was to establish whether Amri had had a network of supporters who helped him to plan and carry out the attack or to flee.
Investigators are also trying to establish whether the gun used in the shooting in Milan is the same weapon used to kill the Polish driver of the truck, who was found dead with stab and gun wounds in the cab.
The attack took place at a busy Christmas market at the Kaiser Wilhelm Memorial Church in the west of the German capital.
According to the Italian news agency Ansa, Anis Amri travelled by train from France to Turin, and then took another train to Milan.
From the central station he travelled on to Sesto San Giovanni, a working-class area.
Amri, a Tunisian national aged 24, had served a prison sentence in Italy after being convicted of vandalism, threats and theft in 2011.
He was known to Italian authorities for his violent behaviour while imprisoned.
After his release he was asked to leave the country. He later arrived in Germany where he applied for asylum in April of this year.
His application was rejected by the German authorities but they were unable to deport him to Tunisia because he had no valid identification papers.
Chancellor Merkel has talked with the Tunisian President Beji Caid Essebsi about the case.
“I told my Tunisian counterpart that we need to speed up the deportation process,” she told reporters.
Anis Amri was named as a suspect in the Berlin attack by German federal prosecutors, and a reward of up to €100,000 (£84,000; $104,000) was offered for information leading to his arrest.
Join GhanaStar.com to receive daily email alerts of breaking news in Ghana. GhanaStar.com is your source for all Ghana News. Get the latest Ghana news, breaking news, sports, politics, entertainment and more about Ghana, Africa and beyond.