Tunisian suspect Anis Amri smuggled the weapon used in the Berlin Christmas market attack across borders to Italy and used it in the shoot-out in which he was killed, Italian police said Wednesday.
Meanwhile, German police were trying to establish if a 26-year-old Tunisian -- who has been arrested in Berlin on an unrelated charge -- was an accomplice of Amri.
Italian police said ballistic tests proved the gun fired at an officer in Milan was the same as the one used to kill the Polish driver of the hijacked truck which Amri is believed to have ploughed into the crowd on December 19 in an attack that killed 12.
"The weapon that killed the driver of the Berlin massacre truck is the same as the one Anis Amri used to wound a policeman in Milan," forensic police said in a statement.
An investigation was underway to see whether the weapon had been used "in other criminal episodes, in Italy or elsewhere".
Amri, 24, the prime suspect in the Berlin Christmas market attack, was shot dead after travelling from the Netherlands to France before heading to Italy.
The Tunisian was approached by two policemen as he loitered outside a Milan train station. He fired at one officer before being shot dead by the other.
German authorities have been trying to establish if Amri acted alone and on Tuesday carried out raids targeting two of his acquaintances.
One of the two had met Amri for a meal in Berlin on the eve of the attack, said a spokeswoman for federal prosecutors, adding that the two "spoke intensively".
"We suspect that the 26-year-old Tunisian was possibly involved in the act or at least knew about the plan for an attack from Anis Amri," said the spokeswoman Frauke Koehler.
Prosecutors do not have sufficient evidence to place the man under arrest over the allegation, she said.
The suspect is nevertheless in police custody over an unrelated case of defrauding the social welfare system.
Investigators are examining "means of communication" collected during Tuesday's raids of the man's living quarters in an asylum seeker shelter, said Koehler.
Meanwhile, the spokeswoman said a surveillance image captured Amri at a rail and and subway station close to the site of the attack.
Amri appeared to be aware of the camera, Koehler said, as he raised his index finger in its direction, in what appeared to be the salute used by Islamic State (IS) militants .
The Berlin rampage was claimed by the IS group, which released a video in which Amri is shown pledging allegiance to IS chief Abu Bakr al-Baghdadi.