"The person killed, without a shadow of a doubt, is Anis Amri, the suspect of the Berlin terrorist attack," Italian Interior Minister Marco Minniti said. Amri, who was the subject of a Europe-wide manhunt, was identified with the help of fingerprints supplied by Germany.
The Islamic State group has claimed responsibility for Monday's attack outside Berlin's Kaiser Wilhelm Memorial Church in which a truck plowed into a crowd of shoppers, killing 12 people and injuring 56 others.
Amri, 24, who had spent time in prison in Italy, was stopped by two officers during the routine police check in the Sesto San Giovanni neighborhood of Milan early Friday. He pulled a gun from his backpack after being asked to show his identification and was killed in an ensuing shootout.
One of the officers, Christian Movio, 35, was shot in the right shoulder and underwent surgery for a superficial wound and was in good condition. Movio's 29-year-old partner, Luca Scata, fatally shot Amri in the chest.
Amri's death doesn't reduce the terrorist threat to Germany, the country's top security official said.
The threat "remains high" and security won't be scaled down, Interior Minister Thomas de Maiziere said.
He praised the two Milan police officers "who did excellent work and acted with great bravery."
"I'm very relieved that this attacker poses no risk anymore," he said.
Amri passed through France before arriving by train at Milan's central station around 1 a.m. Friday, Milan police chief Antonio de Iesu said. He declined to provide further information, citing the ongoing investigation.
Germany's chief federal prosecutor, Peter Frank, said his office is in contact with Italian authorities to establish what route Amri took.
A Milan anti-terrorism official, who spoke on condition of anonymity because he was not authorized to talk publicly about the investigation, said Amri made his way to the piazza outside the Sesto San Giovanni train station in a suburb of Milan, which is 7.5 kilometers (nearly 5 miles) from the main train station.
Two police officers became suspicious because it was 3 a.m. and the station was closed and Amri was alone. Authorities are still trying to determine how Amri arrived at the piazza because only a few buses operate at that hour.
"It is now of great significance for us to establish whether the suspect had a network of supporters or helpers in preparing and carrying out the crime, and in fleeing; whether there were accessories or helpers," Frank said.
Prosecutors also want to know whether the gun Amri was carrying in Milan was the same one used to shoot the Polish driver of the truck he had commandeered for the attack, Frank added. The driver was found dead in the vehicle's cab.
The Milan anti-terrorism official said investigators also are working to determine what contacts, if any, Amri had in Milan. There is no evidence he ever passed through Milan during his previous stay in Italy, where he spent time after leaving Tunisia in the wake of the 2011 Arab Spring uprisings.
Amri served 3½ years for setting a fire at a refugee center and making threats, among other things — but Italy apparently detected no signs that he was becoming radicalized. He was repeatedly transferred among Sicilian prisons for bad conduct, with prison records saying he bullied inmates and tried to spark insurrections.
His mother said he went from there to Switzerland and then to Germany last year.
Authorities in Germany deemed him a potential threat long before the Berlin market attack, and even kept him under covert surveillance for six months this year.
They had been trying to deport him after his asylum application was rejected in July but were unable to do so because he lacked valid identity papers and Tunisia initially denied that he was a citizen.
Authorities say Amri has used at least six different names and three nationalities in his travels around Europe.
A spokeswoman for Chancellor Angela Merkel, Ulrike Demmer, said the German leader would speak with her Tunisian counterpart later Friday to discuss issues including the deportation of Tunisian citizens.
Winfield reported from Rome. Frank Jordans and Geir Moulson in Berlin contributed to this report.
Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.