"The man killed was without a shadow of doubt Anis Amri," Marco Minniti said, referring to the 24-year-old Tunisian who is suspected of driving the truck that smashed through a Berlin market on Monday killing 12 people.
Minniti told reporters that Amri was stopped by two policemen at around 3am (3:00am BST) in front of the Sesto San Giovanni train station, north of Milan.
When he was asked for his identification papers, Amri pulled a gun and shot one of the two policemen, lightly wounding him in the shoulder. He in turn was then shot dead by the police.
A judicial source told Reuters that police had a tip off that Amri might be in the Milan area and that additional patrols had been sent out to look for him.
A rail ticket found on Amri's body indicated he had travelled by high speed train from France to the northern Italian city of Turin, the source said. Amri then caught a regional train to the Milan suburbs.
Islamic State has claimed responsibility for the Berlin attack, in which the truck mowed through a crowd of people and bulldozed wooden huts selling Christmas gifts and snacks beside a famous church in west Berlin.
High alert
Amri was caught on camera by German police on a regular stake-out at a mosque in Berlin's Moabit district early on Tuesday, Germany's rbb public broadcaster reported.
He had originally come to Europe in 2011, reaching the Italian island of Lampedusa by boat. He told authorities he was a minor, though documents now indicate he was not, and he was transferred to Catania, Sicily, where he was enrolled in school.
Just months later he was arrested by police after he attempted to set fire to the school, a senior police source said. He was later convicted of vandalism, threats, and theft. He spent almost four years in two different prisons in Italy before being order out of the country.
The Berlin attack has put Europe on high alert over the Christmas period.
The men - two brothers from Kosovo, aged 28 and 31 - were arrested in the city of Duisburg on information from security sources, police said.
A police spokesman said there was no connection between the Duisburg arrests and the Amri case.
Amri had been identified by security agencies as a potential threat and had had his application for asylum rejected, but authorities had not managed to deport him because of missing identity documents.